Interesting dilemma! As you note, if interest rates rise, housing prices could collapse (they are already unaffordable for almost all working people). You'd like to position yourself to have appreciated investments at that point, so that you could swing into RE. However, the outrageous valuations of today's stock market are obviously based on today's the low interest rates. The tiniest blip in interest rates could change the discount rate on future earnings and have a larger-than-expected impact on stock prices (also see "bond convexity"). Also, as we saw in 2007, stocks can fall because RE got overextended. So if you invest in stocks or bonds, your investments could be down more than housing prices are down.
Unfortunately, there are not many investments other than cash that you'd be glad to own when rates go up.
The ideal "hail mary" play might be something like buying put options or bearish spreads on mortgage or corporate real estate debt REITs / asset holding companies. Then when the foreclosures come in or when higher interest rates decimate the portfolio, their stocks go down and you profit. Similarly, you could use options to get net short exposure to TLT, or at least bet against it rising too much. The problem is you'd have to get the timing just right or else lose a lot of money, or you might be flat-out wrong and rates keep going down for the next 5 years. If you spread your bets over time, you might not have enough invested to move the needle when the everything bubble does pop.
Going to cash is a safer alternative, but historically, sitting in cash for years at a time has been very expensive. You could miss 50% gains while waiting for a crash that never comes. We see that often on this board with various "top is in" threads.
I suppose your best option is to keep your expenses low (by renting), save as much as possible (career advancement, keep expenses low), and get to the point where one of two things happen:
1) RE prices fall and you are able to swoop in on a deal, despite investment losses, or
2) RE prices never fall, you become a millionaire, and can retire to your choice of about 40 other states.
#2 may be most likely in the long run, but how bad is that really?