The answer is simple, but rather unpopular: immigration.
What happens when the places that are making lots of people now, stop?
Us: "Hey India, send me some more people"
India: "Sorry dude, we're out"
India currently is at 2.05 fertility rate, which is replacement rate. Now for quite some time they will have excess population in relation to their wealth, but I don't expect that to last forever.