Some countries and even Canada to a degree have countered this with co-op housing but even sharing a house with friends can be legally fraught and in some cases flat out illegal thanks to antiquated bylaws targetting rooming houses etc. Zoned for "single family dwellings" whatever the fuck a single family is these days.
Add in AIrBnB outside the zoning rules, punitive bylaws about all sorts of crap and even willing developers trying to build lower cost shelter have a maze of red tape to navigate even to get approval and councils tend to be populated by realtors and other vested interests.
Australia was particularly bad with negative gearing allowing the "haves" to save on taxes by aquiring additional homes to rent out....and Australia sucks for renter protection.
If interests ...or rather when interest rates rise there are going to be a lot stranded fish.

and still hundreds of thousands of working poor which will put additional pressure on social services.