It’s official: Democratic National Committee Chairman Tom Perez confirms his party fully endorses free health care for illegal immigrants. That puts illegals ahead of veterans struggling to qualify for civilian care, middle-class working stiffs priced out of ObamaCare and baby boomers facing the likelihood of Medicare cuts.

At last Thursday’s Democratic presidential debate, which included most of the front-runners, all 10 candidates on stage flung up their hands when asked whether they would cover illegal immigrants.

Not one of the debate moderators went on to ask the obvious — how much will it cost, and who will pay for it? Why spoil a Kumbaya moment?

The costs would be enormous. According to Pew Foundation researchers, there are 10.5 million illegal immigrants living in the United States now. Yale University and MIT demographers estimate double that.

If the entire illegal immigrant population were enrolled in Medicaid, the tab would range from a whopping $84 billion a year (10.5 million times $8,015 per person Medicaid cost) to more than double that, $176 billion. But that estimate needs to be pared to reflect the millions of illegals who work and already get insurance through an employer. Covering uninsured illegal immigrants, then, is likely to cost $40 billion to $80 billion a year.

That cost could explode if Democrats push through their open-borders agenda. The front-runners on the stage Thursday night — Joe Biden, Kamala Harris and Bernie Sanders — said they would stop prosecuting and deporting illegals, except those guilty of committing serious crimes. Sneaking into the country should be a civil violation, in the Democrats’ view, like getting a parking ticket.

With no border enforcement, the number of illegal immigrants is likely to soar, pushing up the cost of their health care. So consider $40 billion to $80 billion a lowball cost estimate.

None of the candidates gushing about health care for illegals as a human right showed the same ardor for veterans’ health care. For years, the Veterans Administration has been embroiled in scandals over vets dying waiting for medical care.

Still Congress is nickel-and-diming how much money to spend ­allowing vets to see civilian doctors and get other civilian medical services. The total in the proposed 2020 budget is $8.9 billion, less than half what advocacy groups claim is needed to relieve the deadly backlog at VA hospitals.

But Democrats are willing to spend at least four times that much on health insurance for illegal immigrants. What kind of priority is that?

Worse, Congress is appropriating a paltry $1.8 billion to help homeless vets. Of course, politicians find these comparisons inconvenient. The Dem candidates would like you to believe no one has to go without in order to fund health care for illegals.

But the ugly reality became ­obvious in California this month, when the Democratic-dominated state legislature voted to fund health coverage for illegal immigrants up to age 25. How to pay for it? Democratic lawmakers are slapping a hefty tax — up to $3,252 — on people who go without health insurance, even though they are uninsured because they can’t afford it.

The result is that a single working guy who earns $80,000 a year, which doesn’t go far in Los Angeles, and is ineligible for an ObamaCare subsidy will now be forced to pay a whopping fine ­toward insuring illegals, while he goes without coverage himself.

The real health insurance crisis in this country isn’t about illegal immigrants. It’s about the middle class. The Affordable Care Act added millions of mostly poor people to the insurance rolls. But the same law is driving premiums so high that middle-class people are priced out. They’re ineligible for government subsidies if they earn over $48,560 as individuals or $65,840 as a couple. Roughly 5 million people are going without coverage, according to the Center on Budget and Policy Priorities.

Dems eyeing the White House never mention the plight of uninsured middle-class families. The message is clear: Illegal immigrant lives matter, but vets’ lives and middle-class lives, not so much.

Baby boomers also beware. In 2010, Democratic lawmakers took $750 billion from future Medicare funding to pay for ObamaCare. They robbed Grandma to fund their health care scheme, and they’ll do it again.

Betsy McCaughey is a former lieutenant governor of New York.