Madrid, Buenos Aires, Seoul, Osaka, Barcelona, and Mexico City all seem to have quality cheap central options, too. Tokyo and London seem to have affordable desirable safe quality outlying areas not too far from the center on the train.
The really terrible situation with no viable alternatives seems limited to SF and NY. (Maybe Paris? News about Paris always makes the cheap suburbs seem dangerous and non-French.)