That is the subject of this interesting post by law professor Josh Blackman. Blackman observes, in part:
Another angle to consider is whether the Necessary and Proper clause is broad enough to cover something as invasive as forcing individuals to be vaccinated. While this may be necessary, it is likely not proper. If the Court found that forcing someone to *buy* insurance is improper, then forcing someone to receive an injection is almost certainly beyond the scope of the federal government’s authority–even if this is within the police power of the state under Jacobson. This is even worse than the so-called broccoli horrible.
One more angle concerns the federal displacement of a traditional ground of state law. For centuries, the state police power has entailed regulation over inoculation and quarantines. According to that power, states have crafted various exemptions and approaches that, for better or worse, reflect the considered judgment of their elected branches. A nationwide federal policy would immediately preempt all of those laws. Under NFIB, this counsels against the constitutionality of this invasion of state power.
I agree with Blackman’s assertion that the time to think through these issues is before, and not after, we face a nationwide epidemic. I would also tend to agree that a policy of compulsory vaccinations would probably not pass Constitutional muster.