Homelessness is caused by poverty and poverty is caused by inequality. And inequality is a massive, world-wide problem, period. And as economists such as Thomas Piketty have pointed out: inequality doesn't end happily when enough people get pissed. While waiting for the end, I've found that in most cities in the world, if one understands something about the people and the local social and economic world, speaks some of the language and doesn't act like an asshole, one avoids problems. (Another tip is not to tell people you're American, but something more...neutral. Like Canada. Nobody hates Canadians.)