In January 2009, shortly before his first inauguration, Barack Obama paid a visit to the Washington Post editorial board. The economy was unravelling, the financial system was at risk, and the president-elect was focused on proposals on how to engineer a short-term rescue. But even in the midst of crisis, Obama recognised that the United States would have to reform its entitlement programs if it were to avoid descending into long-term, unsustainable debt.

“This, by the way, is where there are going to be some very difficult choices, and issues of sacrifice and responsibility and duty are going to come in, because what we have done is kicked this can down the road”, the senator from Illinois told us. “We’re at the end of the road. And we are not in a position to kick it any further.”

Here was a leader, in other words, who understood the imperative of reform in an ageing society. He knew how difficult such reform would be politically, but he also understood how essential it was.

Five and a half years later, there has been essentially no structural reform. Obama has presided over the enactment of a vast new entitlement — the Affordable Care Act, also known as Obamacare — and that legislation contained some useful, if tentative, first stabs at restraining the growth of health care costs. But the “difficult choices” he promised — or warned of — have yet to materialise. It turns out there was more road for can-kicking after all.

How could this have happened? Given the poisonous partisanship in Washington these days, it’s not surprising that whom you ask determines the answers you get, from alleged Obama cowardice to alleged Republican intransigence, with many variations along the way. The blame game can make for hours of not-so-pleasant entertainment.

But whatever the personalities and political alignments of this particular moment in Washington, the can-kicking points to a question that is bigger than Obama; that is bigger than George W. Bush, who similarly failed to put entitlements on a more sustainable foundation; that is not limited to the United States. The big question is this: As lifespans increase and fertility declines in most industrialised nations, will their governments muster the political will to safeguard the future?

To put it another way: Can democracy, which has risen to so many challenges, overcome demography?

If that question strikes you as overly dramatic, consider that much of the industrialised world is facing a prospect unprecedented in human history: a decline of population due not to war or plague but to increased longevity and a voluntary decrease in childbearing.

The United Nations report on global population trends released last month tells the story starkly. In what the UN refers to as “the more developed regions”, the population aged 60 and over will increase one per cent per year, from 287 million in 2013 to 417 million at mid-century, and then 1.1 per cent per year to reach 440 million by 2100.

The number of older people will grow even faster in the developing world, from 554 million this year to 1.6 billion in 2050 and 2.5 billion in 2100.

But there are two key differences. In the developed world, the working-age population — defined by the UN as men and women aged to 25 to 59 — will peak this year at 608 million people and will begin to decline next year. By 2050 there will only be 553 million people in that age cohort, the UN predicts, and by the turn of the century only 504 million.

Meanwhile, fertility has dropped in many of these countries to astonishing lows. Replacement rate — the number of children per woman needed to maintain a stable population count — is 2.1. In South Korea, the ratio as of 2010 was 1.23; in Poland, 1.33; in Japan, 1.34; in Australia, 1.89.

Barring major shifts in migration patterns, these trends have two inescapable consequences. One is that many countries will shrink. Japan, for example, which increased from about 82 million during the US occupation to 130 million will dwindle to 108 million by midcentury and all the way back to 84 million by 2100.

The other consequence, even in countries whose populations won’t decline or won’t decline as much, will be fewer and fewer working people to support each retiree. That is true of countries that have plenty of workers today, like Turkey, which will go from 9.9 workers per retiree in 2008 to 3.2 in 2050. It is true of countries in the middle of the pack, like the United States, where the ratio will decline from 4.7 to 2.6. It is true for the average of all industrialised nations in the Organisation for Economic Co-operation and Development, which will decline from 4.2 to 2.1.

And it is true of countries that find themselves at the other end of the scale today, the most extreme of which is Japan. With only 2.8 workers per retiree today, Japan by 2050 will have 1.2 for one.

Think about that for a moment: That’s essentially one for one: one person aged 20 to 64 for every person 65 and older. What will that mean for society? What will happen to entrepreneurship and innovation, to risk-taking and creativity? What kind of priorities emerge in a country in which old people outnumber children?

We don’t know, because we’ve never experienced anything of this kind. But from what is happening already, we can imagine where things might go. In advanced economies, as the International Monetary Fund classifies them, spending on public pensions has increased from 5 per cent of GDP in 1970 to 8.5 per cent in 2010. That’s retirement costs only, not health care for the elderly — and, the IMF adds in its usual dry way, over the next 20 years the “cumulative fiscal cost of projected spending increases is large”.

What does that mean in practical terms? Quite consistently since World War II, the United States government has spent the equivalent of 4 per cent of the nation’s annual economic output on what the budget geeks call “non-defense discretionary” programs. That means pretty much everything the government does outside of Medicare and Medicaid, Social Security, and the Pentagon. It means, in other words, national parks and highways, Alzheimer’s research and food safety, early childhood education and college loans. It means, in a very real sense, the nation’s investment in its future. Over the next ten years, according to the Congressional Budget Office, it is slated to decline to 2.7 per cent of GDP.

Third Way, a centrist think tank in Washington, portrays the same trend this way: When John F. Kennedy was president, spending on public investments — research, infrastructure, education — was two and a half times greater than spending on entitlements. By the early 1970s, entitlement spending was about equal to spending on investments. Today entitlement spending is three times greater — with the trend lines pointing to wider and wider disparities.

The Urban Institute, a liberal think tank, examined the same numbers in generational terms. Its analysis doesn’t tell the whole story, because it doesn’t include state and local spending, much of which goes to schools. But its numbers are sobering nonetheless, and the trends are inescapable. In 2011, the institute found, ten per cent of federal spending went to children, while 41 per cent went to the elderly and disabled portions of Medicare, Medicaid and Social Security. Over the next ten years, spending on children will drop to 8 per cent of the budget, if policies remain constant, while the entitlement piece will grow to 51 per cent.

All of this is, to some extent, inevitable and even desirable. The evolution of public pensions, such as the New Deal implementation of Social Security, has gone a long way toward ending the scourge of elderly poverty; we don’t want to go backwards on that. The Great Society addition of Medicare has meant few old people have to go without health care; that, too, should be irreversible.

But there is a very real question of whether our ageing societies will be able to carve out enough resources to invest in the future — in the education, research, and infrastructure essential to economic growth.

One reason to worry is that many of the statistics cited above very likely understate the scope of the problem, because nations, private corporations, and state and provincial governments are all underfunding their pension obligations. Just last month, Moody’s Investors Service, the private credit rating firm, calculated that state governments in the United States are accounting for only 48 per cent of their pension obligations, well below the (already dismal) 74 per cent that they claim to have provided. The 100 biggest corporate defined-benefit pension funds face a similarly enormous shortfall, amounting to 1.5 per cent of GDP, according to the IMF.

A second reason to worry is that the political pressure will only grow as the population ages. The median age in Germany will have risen from 37 in 1980 to 52 in 2050; the comparable rise in Japan will be from 33 to 54. In the United States, one-sixth of eligible voters were senior citizens in 2012; in 2024, one-quarter will be. How many of them will vote their grandchildren’s interests? Even pension cutbacks already adopted, and factored into national budget projections, may be at risk, as the IMF notes: “As these reforms take effect, political pressure to reverse them could mount”.

It’s important to note this isn’t just a problem of democracies. With its enforced one-child policy, China will uniquely among nations grow old before it grows rich, with the share of those over 60 increasing from 14 per cent this year to 33 per cent by 2050. Even if multi-party democracy has not bloomed by then — maybe especially if China is not a democracy by then — its government, lacking legitimacy, may be even more susceptible to populist pressure than America’s, Germany’s, or Australia’s.

But that is small comfort to those who worry about democracies’ ability to adjust to demographic trends and invest for the future. If a nation is spending profligately and borrowing unwisely, fiscal hawks may expect market forces — rising interest rates, fleeing creditors — to eventually force a correction. But if the problem is a gradual tilting of resources toward the aged and away from productive investment, a slow decline in the quality of higher education or research and development, what forcing mechanism might reverse the momentum? On the contrary, one can easily imagine such a decline becoming a vicious cycle, in which young adults decide that having more than one child, or having any at all, is not a rational choice in a nation with narrowing prospects and fewer and fewer resources going to the younger generation.

One forcing mechanism might be political leadership in the oldfashioned sense — politicians who would put the long-term interest of the country ahead of their electoral prospects, or who would try to protect both by educating voters on the need for, say, pension reform. That is why the Obama of 2008, with his frequent promise to make “the hard choices”, inspired hope; it was why hope was also invested in Representative Paul Ryan, the Republican vice presidential nominee of 2012 who understands as well as anyone the need for entitlement reform. But Ryan’s budget plans consistently postpone any pain for the elderly, preferring over the next decade to squeeze the younger poor (who, a cynic might point out, do not vote in as large numbers). And for Obama, entitlement reform has consistently been next on the to-do list, never quite rising to the top.

Demography is not destiny. Immigration patterns can change. Political courage can surface in the most unexpected places and at the most unexpected times. Japan might find new ways to integrate women into its work force. Europe might get creative in encouraging older people to keep working. The United States could reform its entitlement programs. Democracies have a way of surprising themselves just when things seem gloomiest.

But it would be nice if the surprises began turning up soon. The longer ageing societies wait to tackle the looming problems, the more draconian the solutions must be — and the greater the political resistance.