Shanghai sets population at 25M
The problem they're trying to solve is city slums, which is common in Asia. I've worked in India before, and every major city (Delhi, Chennai) is filled with massive slums of migrant workers who obviously haven't kept up with the modern development. Without turning this into a pity post and sounding like an uncultured asshole, it was horrifying to see and really broke my heart that people are living in conditions like this. This is very common in SE Asia as well if you look at cities like Manila, Jakarta, etc. It's a tried and failed approach to have "open migration" policies in developing countries and have labor conditions race to the bottom.
To a lesser extend, Beijing + Shanghai has this problem as well. I was in BJ 7 years ago (so my experience may be outdated), but there are parts of the old city that still has Hutongs, which are slum like buildings that have largely been vacated but migrant workers have "illegally" occupied. (I put "illegal" in quotes because human beings aspiring for shelter shouldn't be illegal, anyways, off point)The root of the problem is migrant workers moving into cities for slave-like labor and are commonly exploited by local residents and employers. They're offered "jobs" that are way below the legal minimum wage and are often paid under the table. They can't say no because their employers have power over them (threat to report to police, etc). In many sense, "illegal" migrant workers are not that different from "illegal" immigrants.In order to raise the living standards of an entire area, you have to enforce issues like safe labor practice, minimum wage, vacation days, etc. Without heavy hand regulation in a developing countries, these things don't magically come at the kindness of employers. They must be forced. The developed countries all went through this stage much earlier this century (think back on all the activists who died pushing for labor rights in U.S. in early 1900s). When you have a massive population of people who are in dire situations and who don't have anywhere to turn, it's difficult to force employers to raise working standards.It's a difficult issue. On one hand, it's pretty heavy handed and inhuman to tell a migrant worker they're not allowed to live in a city that's part of their own damn country. On the other hand, we don't want cities to race to the bottom with unsanitary and slum like conditions. What's the balance? I've no idea, but I'm glad Shanghai at least understands this is a problem instead of copying other Asian cities that have failed at this