It absolutely can be solved. The problem is that SF's landowners have its politics by the balls, which means that policies which could solve homelessness and broader poverty/destitution overnight - like land value taxation with a citizens' dividend - have zero hope of seeing the light of day.
SF ain't the only one, either; this is a statewide, regionwide, and nationwide issue. Only reason it's more pronounced on the West Coast is because of the more temperate weather; rough sleepers end up surviving for another year instead of freezing to death in winter.