It seems like more developed countries like Japan and those of Western Europe have declining populations, while less developed third-world countries like those in sub-Saharan Africa have rapidly expanding populations. This seems counterintuitive. Why is this the case?
Short answer:
Not a question for historians, this is principally the work of demographers, statisticians and economists. The topic of declining fertility associated with increasing wealth is called "the demographic transition".
Discussion:
Very briefly, falls in the fertility rate will have will be influenced by, and in an amplifying (eg positive) feedback, itself contributes to increasing wealth, improving social conditions and decreasing child mortality. If you're very poor woman with few opportunities or choices in a society where lots of children die before adulthood, you'll have more children, younger-- that one of them might survive to adulthood. That you're unable to invest much in their education matters less when opportunities are few.
Women's emancipation is often a social feature of development, and when women get to have some say over when they have children, they have many fewer -- and they themselves live much longer. Notably when women stay in school - or just have the opportunity to go to school -- they delay childbearing.
The "demographic transition" occurs when the prospects for each child are improving and parents prefer that they invest in the children so that they'll have the human capital necessary to take advantage of these opportunities. Nations become wealthier and birthrates decline-- this is a pattern seen again and again, across cultures. That is, the same transition is seen with increasing wealth in nations as different as France and Japan
Again this particular subject is largely the province of disciplines other than history; there's a massive literature.
Selected Reading:
Ranganathan, S., Swain, R. & Sumpter, D. The demographic transition and economic growth: implications for development policy. Palgrave Commun 1, 15033 (2015). https://doi.org/10.1057/palcomms.2015.33
Mosk, Carl. “Demographic Transition in Japan.” The Journal of Economic History, vol. 37, no. 3, 1977, pp. 655–674.
Campbell, Arthur A. “Beyond the Demographic Transition.” Demography, vol. 11, no. 4, 1974, pp. 549–561.
Lehr, Carol Scotese. “EVIDENCE ON THE DEMOGRAPHIC TRANSITION.” The Review of Economics and Statistics, vol. 91, no. 4, 2009, pp. 871–887.
Blue, Laura, and Thomas J. Espenshade. “Population Momentum Across the Demographic Transition.” Population and Development Review, vol. 37, no. 4, 2011, pp. 721–747.
I-Ju Tsai, et al. “Demographic Transition and Household Saving in Taiwan.” Population and Development Review, vol. 26, 2000, pp. 174–193.
Lawson DW, Mace R . (2011). Parental investment and the optimization of human family size. Philos Trans R Soc Lond B Biol Sci 366: 333–343.