Executives at many publicly traded and nonprofit hospitals make millions of dollars in salary and other benefits.

One in five Americans of working age with health insurance struggled to pay their medical bills in the past year, according to a survey by the Kaiser Family Foundation and The New York Times.

Among the uninsured, medical debt is an even bigger problem, with more than half reporting difficulty paying off what they owe.

But while millions of people face serious financial troubles due to the high cost of healthcare, some hospital CEOs are raking in millions each year in salaries and other benefits.

This has prompted a backlash, with groups in some states fighting to cap the salaries of executives at much lower rates.

Read more: Some hospitals overcharging by as much as 1,000 percent »

In 2014 the United States spent $3 trillion on healthcare. Hospital care accounted for 32 percent of that.

Around one-quarter of these costs are due to administrative overhead, according to a 2014 study published in the journal Health Affairs. This includes the salaries and benefits of hospital executives.

Not every hospital executive earns millions of dollars each year, but most are paid relatively well.

According to a report by the The New York Times, hospital executives in 2013 earned an average annual salary of $386,000. This doesn’t include bonuses or other incentives.

Surgeons made an average of $306,000, and general practice doctors made an average of $185,000.

Among the CEOs of nonprofit hospitals, the average base salary in 2009 was $595,781, according to a study in JAMA Internal Medicine.

In 2015, however, economic conditions chipped away at the bottom line at many publicly traded companies.

This includes hospital executives, who saw their pay drop 17 percent, on average, between 2014 and 2015, according to a review by Modern Healthcare.

In spite of that drop, some CEOs are still making millions each year.

Wayne Smith, CEO of Community Health Systems earned more than $9 million in 2015, a 21 percent drop from the year before.

Tenet Healthcare CEO Trevor Fetter earned $15 million in 2015, down 14 percent from 2014.

Read more: Hospital providers accumulate power through consolidations »

Even executives at nonprofit hospitals can break the million-dollar mark.

This comes as businesses and consumers expect to see more increases in their healthcare costs in 2017.

Michael Dowling, CEO of New York State’s Northwell Health earned $10 million in salary, bonuses, and other pay in 2014, according to LoHud. His combined base and bonus pay has more than tripled since 2010.

The Charlotte Observer reported that Carolinas HealthCare System’s CEO, Michael Tarwater, received more than $6 million in total compensation in 2014, a 25 percent increase from the previous year.

In Massachusetts, Brigham and Women’s Hospital’s president, Dr. Elizabeth G. Nabel, earned more than $5 million in 2014, a 119 percent increase from 2013, according to the Boston Globe.

Much of Nabel’s increased pay was due to deferred compensation that showed up in 2014. Likewise, Tarwater is also being paid long-deferred benefits as he nears retirement.

Read more: Why hospitals are getting into the urgent care business »

Proponents of high pay for hospital CEOs argue that it is needed to attract and keep the most qualified healthcare leaders.

At publicly traded hospitals, CEO compensation is often tied directly to the performance of the company’s stock.

This explains why a CEO’s salary can shift from year to year — or even throughout the year — since some benefits like stock options are dependent on the price of the stock.

Some analysts, though, say that excessive stock options can push executives to “boost share prices by whatever means necessary.”

A recent study conducted by Mercer and Truven Health Analytics found that nonprofit hospitals with better performance on patient quality, finance, and other measures tended to pay CEOs more.

That study also found that CEOs at larger and more prominent hospitals tended to be paid more, as were leaders of teaching hospitals.

However, the study doesn’t show that paying CEOs more actually improves the hospital’s performance.

Some groups are concerned that these multi-million dollar payouts to CEOs are hurting patients.

A voter referendum in Arizona was intended to cap the annual pay of hospital CEOs at $450,000.

The effort was dropped this month when it lost the support of Service Employees International Union-United Healthcare Workers West (SEIU-UHW), according to the Associated Press.

A similar measure in California, backed by the same group, was pulled in July when a state Superior Court judge found that it violated a prior agreement between the union and the California Hospital Association.