Evolution is based on the idea that a biological organism will adapt over time and through multiple generations to reach a state that is ideal for their survival.
Unless Andalites lived in a homeworld extremely similar to Earth, and encountered diseases that also exist on Earth, and eventually evolved to be resistant to such diseases, they would have no immunity to the disease, And If they did do all that, then andalites should also exist on Earth (not at the moment, but in the distant future?) And no, I don't mean exist as in Andalites from other worlds moving to Earth, but that a horse or donkey or so on will eventually mutate and evolve to become an andalite.
Which is pretty unlikely; completely different species here.
Diseases are apparent everywhere on Earth. An alien entity comes to earth, breathes earth air, lives in earth woods, eats earth grass, and drinks earth water, and has to contend with being bitten by earth parasites (fleas, mosquitoes, etc.) which are presumably carriers of earth bacteria.
Even if the andalite system may not be a ideal place for earth bound bacteria, bacteria mutate (ie. 'evolve', if you want) faster than animals, and Ax's immune system does not. It's a simple analogy of an infinite and never ending stream of water against a thick wall. The wall might hold at first, but it's going to erode over time, and unlike bacteria, it doesn't 'renew itself'. Meanwhile, the water will keep eroding the wall, and to hasten the speed, the water will gain in acidity over time.
Essentially, at one point you'll be spraying hydrochloric acide over the wall, and the moment you get a hole, however small, the immune system is screwed.
while Andalites may have lived far longer than humans (may, because we don't actually know the origins of andalites and when it was) your immune system does not evolve to block 'all' disease/viruses. It evolves to be resistant against the viruses or illnesses that it constantly faces. You cannot 'evolve' to be resistant against something you have never encountered. And it would be pretty much impossible for the viruses on earth to exist elsewhere, because viruses are essentially microanimals; they only exist in a certain way on a certain planet, because they've evolved to be on that planet, which is why you won't find tigers on Venus, bears on Mars and other such things. Fauna are often planet exclusive, and diseases and illnesses are no different.