I plan on doing something very similar, I want to make an angle iron frame from the front seats to the lip of the rear hatch. Then I want to put a wooden floor prolly made of 2x6's.
There are already XJ tents available and have been for a long time. Check JC Whitney and others.
One method I could suggest is the same pop up campers use - a slide out floor. A short piece of plywood that with drop down legs can give you all the leg room you need. You also get a semi sheltered cargo area underneath for all the stuff you did have in the back.
As for bears in Yosemite, I guess you can only sleep in metal containers there? No tents at all? Whether it's attached to a Jeep, or just nailed to the ground, fabric is no protection against a hungry bear. The trick is to never have food in the living quarters to begin with - it's the primary way to attract any pest and their predator in there with you.