In my mind, it all comes down to housing policy. Prop 13 needs to go. Restrictive zoning needs to go. The right of residents to complain and lawsuit development projects out of existence[0] needs to go.
In the shorter term, while all this plays out, we need to invest heavily in sheltering our homeless population, getting them off drugs, and getting them help with any mental health needs. Acceptance of this needs to be mandatory: once we have sufficient services in order to help the entire homeless population, I actually do want to "criminalize homelessness". It should not be an allowable choice, and those who are homeless and need help getting back on their feet can get that help, every last person.
Of course, I don't expect any of this to happen. I agree with the OP that the next 15 years aren't gonna look great for the city. I just wonder what it will take. Will people actually wise up, see the actual roots of the problem, and fix them; or will there be a backlash that results in a giant exodus that crashes home prices and leaves the city in shambles?
[0] This one is especially insidious. Often a housing developer will be delayed multiple years before they're able to break ground. The extra money that they have to spend on legal fees, as well as being paid to sit on land they own but can't make money on, drives up the cost of the finished product. I hear so many complaints that all the new development is "luxury housing" -- well, duh. Because of all the anti-housing activism, high-end housing is the only way developers can turn a profit.