Obvious comedic aspects of the cartoon show especially aside, this may be a partial explanation. Think about it:
James can breathe Weezing's smog with no ill effects. Brock was able to hug a Sharpedo. And Ash has gotten trampled, tossed, smacked, singed, smothered, submerged, routed, run over, and electrocuted so often by his Pokemon he should be perpetually hospitalized! Yet these characters always seem to bounce back without serious injury.
Considering [a] it is partially cartoon logic, and [b] Pokémon trainers, much like animal handlers, likely will get somewhat more sturdy and hardy from simply regularly dealing with the animals they train....
Is it at all possible that just being around a Pokémon somehow helps their trainers develop a higher resistance to that Pokémon's special abilities?