As a layman if I had to theorise how this can be... I'd say

- Shifting cultures. In 1900 humans all over the planet were relatively collectivistic. That's moving towards individualistic societies. That means kids leaving homes sooner, getting married less, live in their own apartments despite having relationships. Partly that's due to wealth (an enabler), but more so due to culture (the driving force). After all in some cultures we still see wealthy enough people who live with their parents (e.g. lots of Chinese middle class who can afford living individually).

This means that the square footage per person radically increases.

- Population growth which adds demographically driven pricing pressure

- Lure of cities. Cities have always been concentrated areas of population, but never more than today. In 1870 about 50% of people worked in agriculture (and you can correlate it with where they lived: where the farmland was, i.e. spread out all over the US). Today that figure is generally deemed less than 2% in most OECD countries, and urbanisation is huge, growing from 25% in 1870 to 80% today. It's no surprise then that the value of these areas continues to skyrocket.

And that makes sense. Our value added isn't from the land. It's mostly in the services industry. (i.e. wheat costs 10 cents a pound, but a pound of cereal in nice packaging etc is 310 cents per pound). Crude example but this needs no explanation really.

Land prices being cheap elsewhere doesn't factor in the insane economies of scale and existing infrastructure in cities. Want to build a new house on cheap ranch land, be prepared to build your own sewage, water, electric, satellite internet etc. In that sense overpriced city apartments may actually be considered cheapish sometimes.

- Existing landowners tend to have political power in the area where they own land (and often thereby the buildings, shops, industry etc on top of it). It's in their interest to keep their land scarce, this increases the value of their land. So you now have people with power to keep something scarce, who have a reason to keep something scarce. Often this is pretty artificial, while some property owners oppose loosening restrictions for genuine non-financial reasons (e.g. I don't want a skyscraper in my backyard), many land owners don't really care for building limits if they increased their property prices, but because they usually don't, they oppose them.

On the one hand it seems like a very safe bet: real estate. On the other, here's what I wonder sometimes. Let's take a 50-70 year view, right? We're seeing pretty big leaps in sustainable energy and storage. (enables off the grid). We're seeing big leaps in information networks and coverage. (enables off the grid). We're seeing new generations growing up with ideals of authenticity, renewed mainstream appreciation for hiking, community based tourism, community supported agriculture etc. And finally we're seeing very interesting movements in VR and AR to the extent that working from home etc can get standardised into a human (read: not skype convos) experience closer to regular cooperation in an office. With housing prices growing faster than income, there has to come a point where, say in 20 years from now, a cheap, less urban location, enabled by new technology (less reliant on the grid, able to be very productive using VR/AR) etc will be much more appealing than living downtown in a $1m closet.

These are some extremely unsophisticated thoughts, of course, quickly written up as a layman in these technologies, real estate and sociological trends. Just want to put them out there to think about. I wonder if housing prices will be as safe a bet the next 50 years as they were the last 50.