China wants young people to put money away for retirement. Tao Swift, an unemployed 30-year-old, is not interested in hearing it.

“Retire with a pension?” he asked. “I don’t hold much hope that I can definitely get my hands on it.”

Mr. Tao, who lives in the southern city of Chengdu, is not alone in thinking this way. On social media forums and among friends, young people are questioning whether to save for old age. Some are opting out, citing the shortage of jobs, low pay and their ambivalence about the future.

Their skepticism betrays the enormous challenge for China’s leaders. Over less than three decades, the country has changed from a young society to an aging one. Seven straight years of plummeting births are pushing up the day when there will be fewer people working than retirees.

The fast-changing demographic profile is putting tremendous strain on China’s existing underfunded pension system. An average retirement age of 54, among the lowest in the world, has made this stress more acute.

A grinding economic slowdown, the worst since China embraced capitalism four decades ago, is leaving many people out of work or with little room to put money aside.