The UN projects the global number of megacities to grow from 31 to 41 by 2030, housing some 8.7% of the global population.

Tokyo, Japan, is the largest city in the world with 38 million residents. That's about 12 million more people than New Delhi, India, the second-largest. Although Tokyo is projected to lose approximately 1 million residents by 2030, it's expected to remain the top megacity, according to the UN.

But with rapidly increasing populations, many of these urban centers face major housing shortages. By 2025, 1.6 billion people could struggle to find decent housing that doesn't eat up more than 30% of their income, the standard measure of housing affordability, according to a report by McKinsey. Ultimately, there could be 106 million more low-income households in cities by 2025.