Cities with functional public transport and walkable neighborhoods: Tokyo, Seoul, London, New York City, Paris, Berlin.
Maybe also Madrid and Singapore, but I don't know much about them. Edit: Maybe Osaka and Nagoya, too (I don't know much about them either).
All these have over 5 million population.
But there's also a lot of traffic.
Mexico City deals every day with the challenges of having grown very fast to 20 million before it became rich. New subway and BRT lines, infill development, upgrading properties, and progressive transit and construction planning keep the place getting better to live in and easier to get around every year. Phasing in pollution and emission regulations as they became affordable and regulating polluting industries out of the region step by step worked well, too. In spite of the famous chaos of Mexican government, Mexico City will soon mark thirty years of effective governance and planning, so it can be done. If Mexico can do it, China and the USA -- which are usually considered to be only somewhat worse governed than México -- could probably do it, too, someday.
http://en.wikipedia.org/wiki/List_of_metropolitan_areas_by_p...
As soon as you get go outside, you have suburbs with no life and poor transportation. RER and SNCF trains are late when they're not in strike (1).
As a result, everyone wants to live in Paris or very close, so the prices of housing are very high. And even if you can afford an appartement, it's very hard to actually sign a lease because there are so many potential tenants wanting to rent it.
Add to that the fact that there are very few tall buildings in Paris because they want to keep it some kind of museum city stuck in the 19th century with Haussmanian buildings, the housing problem is not going to fix itself.
(1) In Paris suburbs, most child care provider refuse kids whose both parents use the RER. Because they will have no control on the time they'll be back to pick up their kids. Not exactly what we call "functional public transport".