Not if you switch pokemon. Caterpie gets his shit knocked around after a fe attacks so I switch him out and he gets no exp. Kind of lame. lol, all good. I'm still gonna play.
I don't think I've experienced that quite yet. Oh, like they don't gain EXP after they're defeated?