In Europe, more and more public transportation is free, or at least very heavily subsidized
The costs are covered by local taxes, to curb on individual vehicle use and reduce congestion. After some hiccups, some cities manage good economies of scale where everybody, including the environment, wins.
As for housing and food, while there the incentive structure is more fragile, at least, we have homeless shelters that are free, and once again, everybody wins: the costs are very low, and cities are far safer and cleaner.