Physicians during plague outbreaks certainly did get sick. They lived in the same conditions as those who did get the diseases (which are responsible for exposure to bubonic plague, spread by fleas), and some forms of plague (notably pneumonic plague) can spread from person to person. I don't know of statistics as to physicians vs. non-physicians (such statistics were probably not kept) but there is nothing magical about being a physician and in all outbreaks physicians are high-risk individuals because of their contact with sick people.
If one survives an exposure to plague (not impossible, but not easy) one's body develops resistance to it going forward, so there might have been a selection effect as to who became or remained a successful plague doctor. And in some cases the medical policies advocated at various times did work — quarantine, quick disposal of corpses, wearing heavy costumes that may have prevented flea transfer, elaborate masks that might have cut down on respiratory droplet transfer, etc. — although not always for reasons that were properly understood in the past.
Plague has recurred many times throughout history. It wasn't a one-time deal. We tend to focus on a single major outbreak — the Black Death — because it played a major role in European history. But there were many plague outbreaks. Wikipedia's "Timeline of plague" gives you some sense of this. Plague continually recurs, because it is present in various mammalian "reservoirs" in low-population areas (e.g., marmot species in central Asia), that occasionally come into contact with people.
What has changed over time are two things: 1. in the 19th century, plague's bacterial nature was discovered and that let people more effectively create policies to prevent its spread, including the development of a partial vaccine; 2. the development of antibiotics in the mid-20th century made plague much more treatable than it ever was in the past.
Plague is a bacterial infection, and several forms of it (notably the famous bubonic plague) only spread from animals to people in a direct way (fleas). That makes it much less of a problem than influenza, which is a virus that spreads from person-to-person extremely easily.
Separately, influenza happens to evolve very quickly — this is just a characteristic of it, and why you need a new vaccine every year as opposed to the once-in-a-very-long-time approach you can take with many other vaccines (like measles and mumps). Your body recognizes hostile entities like influenza through their antigens, which have a characteristic "signature." When you survive a disease, or are vaccinated against it, your body learns the signature and can send out antibodies to attack the disease. However influenza just happens to be extremely good at scrambling its antigens and thus creating a new "signature." It also appears very good at hybridizing with other strains of influenza and creating new ones. So influenza is somewhat "special" in its regular seasonal recurrence, and why you need to get a new flu shot every year.