Nh, I think you've played this hand completely correctly. The only range of hands that make sense for your opponent to be holding is TT, JJ, AJ+ or a pair that flopped a set 99, 77 or 22. Conceivably, your opponent could be holding AJ+ and be running a bluff on the river (trying rto represent a set) but if this is the case, take his name and number and be sure to follow him around....♦
I discount pocket 44 and 55 because if he's holding those you've still made the correct play and the opponent is drawing to a two outer to your reraise on the flop. If he's holding 44 or 55, he got lucky and there's nothing you can do about that. You'll make money off him in the long run.
I don't think he's holding higher than JJ because of preflop action. If he had QQ+ he SHOULD reraise the 3BB bet. either way, if he's holding TT+ you've played correctly and induced an all in...i.e. you get paid.
The only three hands you need worry about are 99,77 and 22. And to be fair, a player at SB holding a middle to low pocket pair may just call the raise for set value. However, a player only hits his set once out of every nine times so in my opinion I think it's safe to play the way you do because 8 out of nine times if he's holding a pocket pair, he has not hit his set. Admittedly, no decent player is calling a strong reraise withough a decent hand so then you should consider you experience with the player. if he's a solid player give him more respect, i.e. a check behind on the turn. if he's aggressive/loose, take your line.
I think on the whole you played this hand correctly, or at lease the way I would play it. Hopefully a more experienced player will either confirm what I'm saying or tell you why I (and you) are wrong.