If you're going to reraise this $30 more then you should just shove because you're pot committed anyway with only $20 left. Your raise to $40 has made this pot $53, so if he reraises and puts you all-in pot will be $103 and $20 for you to go, giving you also 5 to 1 which are correct
odds to call even you're up against an overpair (AA, KK or QQ).
I think the better question here is: should I reraise with JJ against a player that I would describe as solid, after he has raised 5 BB from UTG and I'm shortstacked? The fact he had 99 is irrelevant, that's being results oriented. If you have a deep stack then I think you probably should reraise ( $20 more is enough) considering you also have position on him, but in the above scenario any significant reraise kind of commits you, leaving you w/o an escape hatch if he re- reraises you with a monster hand.
If you're going to play shortstacked you need to adjust, it can be a winning strategy but only if you play it correctly. There are bullets to dodge both short and big stacked, and you must always plan ahead in both situations, but the thought process and strategies are totally different.
I'm not necessarily saying that the hand above was played incorrectly, depending on opponent it still might even be the right play. I'm just trying to make you aware of how
pot odds really change when you're shortstacked.
I know the reason you posted this hand is because you were way ahead and you're thinking you lost a chance to get more out of him, but that I can't really answer, because it also depends on your image and how they percieve you, how many times you've reraised in position, what
hands have you brought to showdown in those scenarios, etc. There is just too much involved to be able to answer that. However consider this: villain is UTG with 99, raises 5 BB's and gets reraised from the CO to 20 BB's. Are there really many cases where even you make this call? It will certainly depend on opponent, but I think I can safely say its a fold more times than not, also considering you're shortstacked so, knowing he's behind, he no longer can play this hand for set value and has very little chance, if any at all, to steal this pot with you being left with $20. It's a no win situation for him after your reraise.
More than that I really can't add about knowing if you could have gotten more from this hand, apologies if that disappoints you.