The problem is money, but at a different level. When you deal with the homeless it's too late. That money must be spent before someone becomes homeless, on welfare: unemployment benefits, accessible healthcare and housing. A minor cut taken care of immediately is nothing, but let it turn into gangrene and you won't be able to fix it at all.
AFAIK also SF was long known as "hobo capital", meaning many homeless or drifting people just ended up there. So it's much more complex than that, since many of the homeless are not even locals.
Yes, develop an economy that is not run for rent seekers. Provide a job guarantee so everyone can work at a wage floor. Build housing stock that is actually affordable and desirable for anyone on a normal wage. Make sure healthcare is affordable and available universally. Provide schools that are good regardless of where you live or what you can afford. Those things would be a start.