Thanks for the question game basher. It gave me a chance to revisit Mario 64 DS. It's been awhile since I've played it and it is still one of the best looking 3D DS games. So, I popped in the cart and tried it out. It took a couple of tries but I was able to reach the shelf with the flower. I don't want you to think I'm trying to brag but just to first let you know that it can be done. Here's what I did:
First, I beat up the goomba's. Then, I stood under the box with mario facing the high shelf directly. I then positioned the camera so that it was behind mario and facing the shelf also. Basically, you and mario should be looking at the shelf in the distance. Also, my controls are not set with the touch screen. They are the ones were you direct Mario with the D-pad and can run fast holding Y, jump with B, punch with A. So, the traditional controls, I guess.
Alright, so with that set-up, I jumped into the box releasing the flower. I also jumped again twice to get some hit and hit the flower while it is still in the air. Then I immediately hit up on the d-pad and keep the Up button pushed. I also start tapping the B button. What this should be doing is moving Mario in a straight direction to the shelf and by hitting B constantly you should be sending him higher in the air. However, this is where it gets tricky. You don't want to hit B constantly. Once you reach a height above the shelf, stop tapping. Mario should start to sink a bit. Don't let him fall to low but rather tap the B button every so often to rise him back up to the previous height. This should create a sort of falling rising rythym to give you a bit of momentum as you continue pressing forward. When I succeeded, my flower power was wearing off and Mario was flashing, showing I was about to lose. But, just when it ended, I had reached the shelf and fell on to it. This means it will probably be a tight distance to make and could take a few more tries for you. But, it can be done. I hope you understand what I described and can accomplish it. That's the best advice I can give.
As for jumping from the pillars, I don't know if you can reach the shelf from them in the DS game. I know that's how you got the star in the orginal 64 version but they may have changed the distance this game. And since you just asked for help with the flower power, I never tried jumping from the pillars. Let me know if you need further assistance.