I've gotten the flu shot for years and have managed to avoid getting the flu for years as well.
I'll note that immunity is a complicated thing when it comes to the flu, but one thing they have noted is that flu vaccines do actually last multiple years. IE if you have gotten the flu shot every year for the last 5 years, you are less likely to get the flu than if you only got this year's vaccine. The previous year's vaccine might be a better match for the virus you happen to be exposed to.
As Ben noted HIV gets about 10 times as much funding as Flu does, but some of this stuff overlaps. There's some fascinating research into targeting the parts of the virus that can't mutate as much and still be a functional virus for antibody development.
Basically, those who survive with the virus long enough will often develop antibodies that are basically like terminators for the HIV virus. They're so effective that patients with them often don't need antivirals or other drugs at all to keep their virus loads low enough to be considered non-infectious. Only because the virus is so widespread by that point, as well as being a retrovirus that can hide. The theory is that if a non-infected person has those antibodies, that the HIV can't spread far enough early enough, for it to create a sustained infection.
HIV infectees are most infectious after the first couple weeks until the first couple months, on average. After that, they're only highly infectious again when full blown AIDS starts.
So, if you can eliminate the first couple months where the virus is rampaging without opposition...
So vaccine research is going into how to most effectively teach somebody's body to make those antibodies in particular. HIV specifically, but much of the research can be adopted elsewhere.