Proving them wrong. Or undoing the negative situation they created.
This can in fact be quite a powerful driver. When I was younger a hurtful comment by a teacher led me to start getting good marks in their subject. This was definitely fueled by the anger I felt at the dismissive remarks, as teenager me had no other motivation.
Another payback could be to increase your status to their level (not decrease theirs) so you can do things differently and make things right. What Mandela did basically.
Maybe making them feel remorseful or regret their initial action, but to me this is a byproduct and ends up not mattering that much. In the situation I described I didn't really care what the teacher felt or what effect there was on them (likely none at all). Though there was some satisfaction in proving to myself they were an idiot.