The Economist Intelligence Unit ranked 173 cities in areas like culture, health care, education, stability and infrastructure.