My theory is that, generally speaking, urban areas can thrive if the region as a whole sees them as a cooperative venture and works to support them. Thus, Greater Boston, which is surrounded by liberal New England, winds up a pretty nice place to live. For example, it has the lowest murder rate of any large MSA in the country. But when an urban area is surrounded by a conservative region, like say, St. Louis, the surrounding areas are more focused on containing "those people," and limiting any loss of tax money to them, than they are in urban upkeep. So, you wind up with dysfunctional cities. I think most of the bad cities in the US fit that pattern (New Orleans, Detroit, Chicago), while most of the large livable cities are embedded in large liberal regions (Boston, NYC, Seattle, etc.). And I think that's true abroad, too, where the most livable cities are nearly always in liberal regions (London, Munich, Copenhagen, etc.)
That said, it's not a perfect theory, since there are clear exceptions. My understanding is the region around Oakland's liberal, and it's a mess. Same with Baltimore. And Salt Lake City is in good shape despite conservative surroundings. But the Mormons are a pretty consistent exception to my ideas, and I'm not exactly sure why.