The ratio of working-age people to retirement-age counterparts is dwindling across the developed world.