Stop and think for a second. Someone in good health with a willingness to DIY and a sufficiently flexible schedule can literally build their own house from the ground up. It's a substantial time investment but not actually as much as you might think. Housing isn't very resource intensive compared to the rest of the modern economy.
The only possibilities I can imagine to explain unaffordable housing are broken regulations, critical levels of resource exhaustion, natural or man made disaster, and gross economic dysfunction.