It literally was affordable just fine when it was treated as an investment before, back in the '90s. It's always been treated as an investment. What happened is we stopped building enough of it.
If you stop making enough food, people starve.
If you stop making enough housing, people go homeless.
Population growth of adults has gone up, while housing production of bedrooms has gone down.
I don't get why this is complicated.
I thought the pandemic gave everybody a very harsh lesson about what happens to prices when we stop making stuff (two words: chip shortage) but I guess lessons are hard.