ObamaCare wasn’t supposed to give free health insurance to everybody. The Affordable Care Act’s authors expected the poor would enroll in Medicaid, while those with higher incomes would buy coverage through the new insurance exchanges, with subsidies that decrease as income rises.

It isn’t working. A study published this week by the National Bureau of Economic Research finds that in several Medicaid‐​expansion states most people who gained coverage have enrolled in Medicaid regardless of their income. In practice, ObamaCare has turned Medicaid into an entitlement program for the middle class.

Using data from U.S. Census Bureau’s American Community Survey, the authors assessed coverage changes from 2012–17 in nine states that expanded Medicaid vs. 12 states that didn’t. They uncovered a huge problem. In 2017 alone, in those nine states, “around 800,000 individuals … appeared to gain Medicaid coverage for which they were seemingly income‐​ineligible.”

ObamaCare is supposed to make Medicaid available to households with incomes below 138% of the poverty line, or nearly $36,000 for a family of four. In the nine states—Arkansas, Kentucky, Michigan, Nevada, New Hampshire, New Mexico, North Dakota, Ohio and West Virginia—the authors found that among households with incomes 138% to 250% of the poverty line (about $65,000 for a family of four), some 78% that gained coverage had improperly enrolled in Medicaid. That was also true of 65% of the population above 250% of poverty that gained coverage.

This isn’t a matter of growing pains. Improper enrollment has increased over time. It was two to three times as prevalent in 2017 as in 2014. It’s a systematic problem with ObamaCare in practice.

These estimates likely understate the true problem. People tend to minimize total income when responding to surveys. The authors chose these nine states because they adopted the ObamaCare expansion in 2014 and didn’t previously cover any able‐​bodied, working‐​age people in Medicaid. The nine account for less than 20% of the total population living in expansion states.

There’s evidence of massive improper enrollment in other states. According to 2018 reports by the Inspector General’s Office at the Department of Health and Human Services, 25% of Medicaid expansion enrollees were likely ineligible in both California and New York.

A state audit in Louisiana found 82% of expansion enrollees were ineligible at some point during the year they were enrolled. The central problem appears to be the state’s reliance on the federal exchange website to determine eligibility. People who entered no income simply to explore their options were automatically enrolled in Medicaid. Eligibility works the same way in another seven states.

The number of ineligible enrollees in these three states alone almost certainly exceeds one million people. These findings should alarm Americans across the political spectrum. They show that complicated government programs often bear little resemblance to planners’ designs. ObamaCare has turned out to be a giant welfare program, with millions of working‐ and middle‐​class Americans improperly receiving Medicaid—a reflection of the unpopularity of the exchange policies and incompetence of government oversight.

States that opted not to expand Medicaid have been much better able to preserve private coverage. Employer‐​sponsored coverage has steadily grown in nonexpansion states with virtually no growth in expansion states.

The Centers for Medicare and Medicaid Services need to do much more. While CMS cannot undo the structural flaws at the core of ObamaCare, they can use their oversight and enforcement powers to minimize the massive improper and fraudulent expansion enrollment. Medicaid needs to be protected and taxpayer dollars preserved for the disabled and low‐​income children, pregnant women and seniors.