Keep in mind before you reply, only "the penalty" is paid directly to the government.
The insurance itself must originally be bought outside of government.
I think the best analyis is that if the general statement of the statute is a tax merely on existing as a human being, with additional provisions exempting various categories from that general statement, then it is a direct tax.
On the other hand, if the general statement of the statute is a tax on the taking of an action, with additional provisions exempting various categories from that general statement, then it is an excise tax.
For example, a tax that applies to the purchase of gasoline is an excise tax.
On the other hand, a tax that is laid on all people, except those who purchase gasoline, is a direct tax.
In other words, as a general matter, one cannot redefine the essential nature of a tax simply by adding on exemptions.
The only exception would be a case where the exemption category itself renders the general statement of tax meaningless.
But these are not easy questions. As the dissent said, they should have given a more serious analysis to it.
Remember, the lower courts for the most part didn’t take the tax claim seriously, it seemed like a fall-back argument thrown in hoping it might stick to the wall. I’m beginning to think what happened here is that there was a 5-4 majority to strike it down under the Commerce Clause and Roberts grabbed onto the tax thing late in the process, changing his vote and then it ended up getting rushed out the door without a lot of sound analysis on that point.