Its also important to realize that getting the flu one year doesn't do much for the next flu you are exposed to unless it is the exact same strain or a very close relative. So while you're "training" your immune system, you're only training it to recognize those strains that are identical or...
Allelopathy
It's true that some plants do this. Pine tree needles are very acidic and tend to make the soil beneath them unsuitable for most competitors. The overall term for this kind of behavior you're talking about is Allelopathy. A quick search of this in google will yield lots of...