This is such a good analogy. There are some things that bacteria can evolve to deal with, like training yourself to build up an immunity to iocane powder. There are some things they cant, like training yourself to be bulletproof.
Train yourself, no. Evolve it? Yes. But you'll need an awful lot of generations. Put a robot gun where everything has to come to drink--but it's an air rifle, calibrated to the point of maybe causing injury. Every year you raise the pressure by a tiny bit.
The reason you can't evolve bulletproofness is that it's an overwhelming force. You get evolution when you subject your target to something that only gives a partial kill.
The germicidal effect is a function of the DNA being directly affected by the UV rays and breaking apart. Very few organisms exist that could adapt, this would require external shells, skin etc, not typically found in microorganisms.
I also wonder about stuff like this. I think some things are just a bridge-too-far for organisms to evolve protections against. For instance, are we worried about using too much bleach? Or stepping on cockroaches?
There are radiotrophic fungi that thrive in Chernobyl, so I wouldn't hold too much hope for UV either. It probably won't be able to penetrate a decent biofilm.
> I think the microbes are still trying to figure this one out.
They mostly figured it out a couple billion years ago. Cyanobacteria oxidized Earth's surface until the atmosphere was flooded with molecular oxigen, that gets turned to ozone in the stratosphere, filtering most UV. Pretty large engineering feat for a bunch of microbes.
You are correct, however most of the harmful rays get filtered out in the upper atmosphere. Far-UV doesn't reach Earth, only UV-A and small amounts of UV-B (if the ozone layer is more or less intact that is!).