The findings show an increasing economic importance of foreign-born residents in the U.S. Younger immigrants who arrive in the U.S. typically find jobs and start families.
Changes in the world's demographics "could alter the distribution of global economic power over the coming decades," said Rakesh Kochhar, a senior researcher at Pew.
"Demographically, at least, America is poised to maintain its global status while many European and East Asian nations shrink either in absolute or relative terms. India and several African nations may benefit from the projected demographic trends," Kochhar said. "Immigration is the main reason why population growth in the U.S. will be much greater than in Europe or East Asia."
Just 26 percent of Americans said aging in their country is a "major problem," according to the report, which was released Thursday. Concern about aging was highest in Asia 87 percent in Japan, 79 percent in South Korea and 67 percent in China. In Europe, more than half of those surveyed in Germany and Spain pointed to increases in the older population as a major problem in their countries.
Americans were relatively optimistic that they will have an adequate standard of living in their old age. About 63 percent of those surveyed said they were "very confident" or "somewhat confident" about their retirement security. They ranked near the top along with other countries with younger populations or strong economies: China, Brazil, Nigeria, South Africa, Kenya and Pakistan.
Americans' confidence about retirement security may not always match up with reality. Polling last year by the AP-NORC Center for Public Affairs Research found that most Americans over 40 underestimated the costs of their likely long-term care needs and were not doing much to prepare for them.
According to the Pew survey, retirement security confidence was lowest in Japan, Italy and Russia.
Because of high rates of immigration, America has one of the higher birth rates in the developed world. Its population is expected to rise by 89 million, to 401 million, from 2010 to 2050, with immigrants and their descendants accounting for about 80 percent of the increase.
Still, immigration to the U.S. would have to be 15 times the present rate for the proportion of older people to younger people to remain constant, rather than to increase.
China, currently the most populous nation at 1.4 billion, is projected to add only 25 million people by 2050.
Global aging is driven by social and economic factors. Compared to previous decades, marriage rates in general have fallen and birth rates have dropped, due in part to the development of contraceptives. Also playing a role in declining births are the rising costs of raising children, increases in women who attend college and are in the labor force as well as the reduced need for children to care for parents in old age.
Globally, the median age will rise from 29 to 36 by midcentury. That's faster than the U.S. increase from 37 to 41.
Asked who should care for the elderly, people in 13 of the 21 nations pointed mostly to government, with public opinion ranging as high as 63 percent in Russia. These countries were generally less confident about their future standards of living.
The U.S., South Korea, Germany and Britain were the only countries surveyed in which more than a third of respondents said the elderly bear the most responsibility for their own well-being, as opposed to government or their families.
Widespread aging will have a financial impact. Public pension spending as a share of the gross domestic product is expected to rise in all surveyed countries except Mexico and India from now until 2050, the report said. South Korea, China, Brazil and Russia are projected to see big jumps in spending, while pension expenditures in the U.S. will remain modest due to less-rapid population aging as well as government efforts to limit spending, such as by raising the retirement age.
The Pew study was based on an analysis of United Nations population data as well as Pew surveys conducted in 21 countries from March 3 to April 21, 2013. The Pew surveys had 22,425 responses. The countries were Argentina, Brazil, Britain, China, Egypt, France, Germany, Indonesia, Israel, Italy, Japan, Kenya, Mexico, Nigeria, Pakistan, Russia, South Africa, South Korea, Spain, Turkey and the United States.
The margin of error for the global survey varies across countries, from plus or minus 3.1 percentage points in Spain to 7.7 percentage points in Turkey.