TERRY McAULIFFE, the Democratic candidate for governor of Virginia, wants to spend more on pre-kindergarten education, community colleges and other programs. In a state resistant to tax increases, where would he find even the relatively small amounts of money he’d like to marshal?

Mr. McAuliffe’s answer sounds counterintuitive: Expand Virginia’s Medicaid program, a state-federal effort that offers health-care coverage to poor Americans. Under the Affordable Care Act, a.k.a. Obamacare, the federal government is offering to pay full freight for any state willing to expand coverage. In several years, the federal contribution will diminish a bit, but Washington will still pick up 90 percent of the additional cost. Some economists argue that states that expand their Medicaid system will reap a revenue windfall even beyond the direct federal support. One reason: States would no longer have to pick up the tab for emergency-room care for those who are newly covered by Medicaid. Another: The increased Medicaid spending would generate jobs and, therefore, income-tax revenue.

Counting on this program as a revenue source to fund a broad economic agenda poses several problems.

First, as The Post’s Laura Vozzella has pointed out, the General Assembly may continue to oppose Medicaid expansion. Mr. McAuliffe has said he might not sign a budget unless it contains expansion. Republicans say the Democratic candidate is courting a state government shutdown if he sticks to that position.

Even if Mr. McAuliffe could persuade legislators to go along, much of the projected windfall would come in the first few years, when the federal contribution would be highest. After that, Virginia would have to pony up some cash of its own. If the state banks some money early, it could use the savings to pay for various expenditures for some time — estimates tend to look at an eight-year window. But then the state would have to adjust to diminished federal support. Future governors would have to cut back on Mr. McAuliffe’s higher funding levels for education or find another source of revenue. And even estimates of an eight-year windfall may be optimistic.

None of this argues against expanding Medi­caid in Virginia. Mr. McAuliffe is right about that, and the Republicans, including his opponent for governor, are wrong. Many Virginians would get health coverage, almost entirely on the federal government’s dime. Expanding Medi­caid is the right thing to do. But it is not a sustainable or realistic way to finance new spending in other areas.