Here's how a rational market works. If I build an apartment complex, eventually those apartments will get older and more affordable. And even before that upper middle class folks will move in, freeing up their previous homes.
But that's not how many in local governments see it. So you have affordable housing quotas on new developments.
You have developers building units for the homeless at 600k each. https://abc7news.com/post/new-high-rise-building-house-skid-...
Affordable housing vouchers, section 8, etc, become a dystopian nightmare.
11 year waiting list. https://laist.com/news/section-8-waiting-list
The problem is twofold, first it's too difficult to build homes. In California you can literally just claim a new highrise will block your sunlight and make you sad. That's enough to delay a construction.
Parking requirements ensure space that could be occupied by people is instead reserved for vehicles. Plus the parking structure itself drives up the cost to build, 30% of your construction cost isn't unreasonable.
On a macro level, many cities should of fixed their issues with inadequate housing construction decades ago.
On a personal level, you need to go where you can afford.
After about 4 generations of living in LA about half my family has left. It's more than possible to make it off a middle class salary, but you need to make that choice.
If you stay in an unaffordable city you can't wait around waiting for politicians to fix it.