Volunteers celebrate packing 250,000 meals for seniors during the second annual Celebration of Service meal-pack event sponsored by the AARP Foundation on the National Mall in Wasington in September. (Pete Marovich/For The Washington Post)

However this election turns out, the 2016 campaign for the White House will undoubtedly be remembered for its vulgarity, mean-spiritedness and mendacity. It has been a national embarrassment. But a parallel failing is less noticed: the unwillingness of both candidates — Hillary Clinton and Donald Trump — to come to grips with national problems that are staring them in the face but involve unpopular political choices. I refer, of course, to an aging society and immigration.

The most obvious is an aging society. In 1990, those 65 and over comprised 12.5 percent of the population; now, according to Census Bureau projections, that share is racing toward 16 percent in 2020 and 19 percent in 2030. That’s one in five Americans. Already, federal spending for older Americans (mainly Social Security, Medicare and nursing-home care under Medicaid) dominates the national budget. It’s crowding out spending on other programs, from defense to parks, and is the chief source of chronic budget deficits.

Nor is that all. The economy’s slowdown reflects in part the retirement of millions of baby boomers, whose exit from work reduces labor force growth. The generational unfairness is palpable. Younger Americans are seeing more of their taxes diverted to care of the elderly, who often are in better financial shape than the young who are subsidizing them.

What we need — it was obvious even before the Bill Clinton presidency — is a new social contract between generations, one that acknowledges longer life expectancy (justifying higher eligibility ages for Social Security and Medicare benefits) and greater wealth among millions of older Americans (justifying lower benefits for well-to-do retirees).

Neither Clinton nor Trump is having any of this. Clinton promises higher Social Security benefits; Trump pledges not to cut benefits and implies that he might raise them. The reasons are obvious. Older people vote more than the young; they are also sympathetic characters. No one wants to harm Grandma. Why fight these political realities, no matter how strong the case for a new social contract?

In the final hours of the election, Trump and Clinton supporters from key swing states reflect on one of the most contentious presidential races. (McKenna Ewen,Whitney Leaming,Erin Patrick O'Connor/The Washington Post)

As a political issue, immigration is similar. What should be done is not popular enough to get done. In 2014, the 42 million foreign-born population comprised 13 percent of the U.S. total, the highest share since the early 20th century. Of these, about 11 million are undocumented immigrants, a number that has been relatively stable since 2009, according to the Pew Research Center.

The United States has a long, though difficult, record of successfully absorbing new immigrants. To succeed, assimilation needs time. Immigrants need to conquer the language, learn new skills and adapt to U.S. habits. If there’s a large, constant influx of new immigrants — especially low-skilled immigrants — assimilation is harder for everyone. Competition for poorly paid jobs intensifies. So does the tendency of immigrants to remain in largely ethnic neighborhoods.

All this suggests an obvious immigration agenda. First, we need to reduce illegal immigrants, both because illegality is bad in its own right and because the constant inflow frustrates assimilation. To further discourage illegal immigration, we should make E-Verify — a system for employers to check the immigration status of job applicants — mandatory for most businesses. We also need to legalize the vast majority of undocumented workers who have been here for years and don’t have a criminal record.

Finally, we need to reform legal immigration so that it favors the entry of high-skilled workers, who aid the economy and assimilate more easily.

What we know for a certainty is that these two great population trends — aging and immigration — will, to a large extent, shape the United States’ future. If elections are about the future and not the past, you would have expected much of the campaign to have been involved in a serious discussion of how to deal with them. You would, of course, have been wrong.

On immigration, what we got from Trump was demagoguery that played to the basest fears of many Americans. He would deport all 11 million undocumented immigrants, a cruel and impractical proposal that he modified repeatedly. He’d also build a wall along our southern border, a policy that — as part of a larger package legalizing most of today’s undocumented immigrants — may be worth a try. But Trump’s proposal was all one-sided. By contrast, Clinton favors “comprehensive immigration reform” but is vague on how she would reduce illegal entry.

On aging, there was an unspoken consensus: Don’t go there.

1 of 57 Full Screen Autoplay Close Skip Ad × Hillary Clinton on the campaign trail View Photos The Democratic presidential nominee on the road as Election Day nears. Caption Hillary Clinton loses to Donald Trump in the 2016 presidential election. Nov. 9, 2016 Hillary Clinton speaks in New York while her husband, former president Bill Clinton, applauds. Melina Mara/The Washington Post Buy Photo Wait 1 second to continue.

But as a society, we’re already there. The United States is getting older and will continue to do so. Immigration is changing the country ethnically and will continue to do so. The question is how much we control our future or how much it controls us. The inattention of Campaign 2016 to these fateful issues is the real national embarrassment.

Read more from Robert Samuelson’s archive.