What's the basis for that conclusion?
Just like the last 30 years, some markets will decline, while others will appreciate. Not sure why you think things will be so drastically different.
It really depends where your $500k house is located. "Location, location, location" is the saying for a reason. If your home is in an area with continued economic opportunity and growth and it has not been destroyed by climate change related severe weather events, it doesn't matter that much what the macroeconomic housing market is doing; your property will be in demand.
While certainly the US population is aging and slowing in growth rate, I have not seen any predictions for a population decline by 2050 or even 2100.
You are right that further urbanization is expected and buying outside of cities may not be a good investment.
I think the boomers will trigger a sell off but as long as population grows due to immigration, there will probably never be a glut.
There is no indication I can see that these trends will reverse. If anything it seems like the rates of decline may accelerate more rapidly like they did in Japan.
Perhaps when the boomers die off the next generation will open the borders so someone can pay for their entitlements. Perhaps.
The answer to when the big crash happens is in the population data. At some point population starts to decline.
As with everything, the boomers will ride in the sunset with bags of gold. In 30 years housing will be fundamentally different in the US and just about everywhere in the Western world. Outside of the major cities it won't even be much of an investment anymore.
If you buy a house today for $500k on a 30-year you'll spend close to a million dollars before you own it if you ride the loan out, and adjusted for inflation, you will probably take a loss on it. Possibly a large loss. Unless we see mass immigration the market 30 years from now is simply going to be smaller.