Yes, but it's a narrower case than you might think.
A vaccine, even an mRNA vaccine, is a foreign material that invades the body, provokes an immune response that (frequently) will make someone feel a bit ill. If that's not infection, it's extraordinarily similar. In practice, infectious diseases is caused by a pathogen (or its toxins), and a pathogen is understood to be something like a virus, bacterium, parasite, fungus, etc., with an idea that the pathogen could be transferred between hosts and replicate in the next, thus the illness transmitted. That might rule out many or all vaccines.
It's also just incredibly unhelpful and confusing to say that someone is "infected" by a vaccine. Although I am sure it's a way of putting it that the anti-vax community might love the idea of, because it's liable to scare people off vaccines. Potentially of course they deliberately play on this.