As health insurance can’t be sold across state lines, it is not part of interstate commerce and cannot be regulated by Congress. Now if they had mandated it be sold across state lines, they can apply the commerce clause.
Of course, then there’s the speedbump of being “taxed” (read: fined) for not buying something.
Being taxed for inaction is in, effect, a “poll tax,” IE a tax on existence, and I think that’s a no-no, constitutionally speaking.