Could a hernia cause one testicle to suddenly get smaller than the other one?

Unlikely . is far more likely that one testicles is enlarging suddenly rather then one shrinking suddenly. You should be examined by a urologist.