It is interesting to ask the question of constitutionality about the Social Security system in the United States: Social Security seems on the surface to be a requirement that everyone purchase retirement and survivors' insurance, so how did that pass muster with the Supreme Court?
Well, a little study of history shows that this was a big controversy back in 1937, when the Supreme Court took the case Helvering v. Davis. The Court ruled that Social Security was constitutional under the Tax and Spending Clause, Article I Section 8 of the US Constitution.
The US government, in that case, went to great lengths to argue that Social Security was not an insurance plan. It was just public policy to provide for the general welfare of the country, and it was supported by a tax system not directly related to the specific policy. The Court agreed.
Note the difference with health care insurance today, and the individual mandate. It seems pretty clear that the individual mandate is to buy insurance -- a real contract with a private company, not a "maybe we will give you something when you retire" sort of scheme with the Federal government (again, the government argued that social security was NOT an insurance contract in the general meaning of that phrase). And you could avoid social security by not working and not paying the tax. The penalty of the individual mandate is a funny kind of tax for sure, which you avoid by engaging in the activity.
Remember that the individual mandate exists to avoid folks gaming the system, waiting until they get sick to buy insurance. Such behavior results in pre-exisiting conditions clauses, something most of us find very disturbing. But there are other ways around this problem, as in requiring insurance companies to issue to anyone who has continuous coverage (see my earlier posts). To save the folks who still game the system and end up sick and at our doors begging for mercy, there could be a high risk pool (as there now is) funded by general tax revenues...or even a tax on the insurance that the rest of us buy. Such a plan would seem to be on safer constitutional ground as it does not mandate that anyone do anything.
Such a plan is not without its problems, and would still be subject to gaming unless the high risk pool carried a significant cost, as in substandard coverage. Such a plan also would have would have made the price tag of dealing with those who try to avoid buying insurance real obvious, with the cost to everyone clear in the taxes they paid.
So in order to get the Bill passed (and I think to be able to say that the US has mandatory coverage) the Administration opted for the tactic of making everyone buy insurance, thereby avoiding the price coming to the government and having to be funded by taxes. And we are in the midst of a long protracted legal battle -- with declining support in the public and in Congress for the bill. Again, go back to the Social Security court fight -- there we had increasing public and Congressional support for the legislation.