Sometimes the Supreme Court (or a majority of it, at least) seems to behave as if it exists in the same universe as rational human beings. Sometimes it doesn't. Today it did both.
On the headline question posed by the Affordable Care Act, the Court--or John Roberts, at least--decided to observe the laws of logic. Discussing the financial penalty that undergirds the individual mandate, he wrote: "Our precedent demonstrates that Congress had the power to impose the exaction in §5000A under the taxing power, and that §5000A need not be read to do more than impose a tax. That is sufficient to sustain it" (p. 39). Statutes should be construed in such a way as to make them constitutional if possible. Since Congress could have justified the law under its taxing power, and since that would have been constitutional, the law is constitutional.*
On the second question, however, Roberts--along with Stephen Breyer and Elena Kagan--lost contact with the realm of ordinary logic. He argued that the Affordable Care Act, by conditioning all state Medicaid funding on the expansion of Medicaid programs to new beneficiaries, is "economic dragooning that leaves the States with no real option but to acquiesce in the Medicaid expansion" (p. 52). (Scalia, Thomas, Kennedy, and Alito thought the whole act should be jettisoned, including the Medicaid expansion.) Therefore, instead of merely "pressuring" states to expand Medicaid coverage, it constitutes "compulsion" (p. 50). The particular problem is the federal government's power to withdraw funding for "existing Medicaid" if states did not provide "new Medicaid."
But consider this. Clearly Congress is allowed to make program funding contingent on adhering to the program rules that it dictates. That's how Medicaid works today: If you don't meet its minimum coverage requirements, you don't get funding. So, instead of passing the Medicaid expansion component of the Affordable Care Act in the form it did, Congress could have done the following: first, repeal existing Medicaid in its entirely; second, pass a new version of Medicaid, in its post-Affordable Care Act form. Since existing Medicaid would then be completely off the table, the new version could not possibly be unconstitutional under Roberts's logic.
That's all it would take to insulate the Medicaid expansion from Roberts's criticism, and clearly Congress could have done that had it known the Supreme Court was in the hands of medieval scholastics escaped from the monastery. By the same logic applied to save the individual mandate, that should have been enough to save the Medicaid expansion.
Instead, what we are going to see is Republican-controlled state governments refusing to expand Medicaid out of bitter hatred toward President Obama and spite for the working poor who need access to health care. You can expect to see every organization with "Tea Party" in its name demanding that Republican politicians decline the federal money and refuse to expand Medicaid, even when expansion would be in the best interests of that state's citizens. And we can thank John Roberts for that.
*Roberts did, however, dispense with the laws of economics--and common sense--in saying that the individual mandate could not be justified under the Commerce Clause because it regulated inactivity rather than activity, as if people without health insurance somehow exist outside the market for health care.