Yeah I’m surprised to see this posted without mention of the Michael Shellenberger work on this topic. I actually think the above analysis hints at it: Why is there so much homelessness concentrated downtown here?
The elephant in the room is that many people who have hard drug habits prefer to live in encampments in central cites, and the authorities in the Bay Area (especially SF) are supportive of them doing so.
There are also a lot of people with housing insecurity due to the challenges of affording rent, but those are not the people living in the visible encampments.
This is a bit left field but I just talked to people who are doing biofeedback to help people achieve the Jhanas. They have Leigh Brasington advising and are quite serious. The founder is an engineer but needs help. If you’re interested I’m John dot v dot McDonnell at Gmail.