I would say that yes, you played them wrong.
Pre-flop, we are on the big blind. HJ opens 3x. CO 3-bets up to about 11bb. Our stack is about 25bb. We CANNOT flat call this. First, we don't really want to play post-flop with this hand against 3-bet range. 3-bet range will have a TON of A and K in it. There will be a fair amount of ugly flops that JJ will have to check-fold (we are out of position to both Villains), so we can't put 40% of our stack in with a plan to check-fold the flop probably 1 out of every 3 times. And that's just the flop, we could get an awful turn or river card too. Furthermore, we don't even close the action. The original raiser could easily squeeze-jam, which he in fact did. And if he doesn't raise, our stack is about the same size as the pot, so our only play post-flop is to fold or jam the flop anyways. So this is either a fold or a jam. The one thing that we cannot do here is flat call. With JJ the one thing that we do have is some pretty good showdown value, so if we wish to continue our best move is to shove it all-in and force that showdown. The CO is calling but we might get the HJ to fold, and if not we still have a decent chance to win if he hit a miracle J or if the board bricks 5 times. If we're not comfortable with that, we can just fold pre and let these 2 stack off to the death. Shove or fold, either is fine, You've been at this table for a while and have a feel for their tendencies, and some gut instinct.
This is also a stack depth issue. No matter what 2 cards we have, we cannot flat call here at this stack depth. With the action to us this is hand becomes an icm play.
Hands like QQ, JJ TT in general cannot be played passively. They only have 2 outs to improve and are very vulnerable to overcards. They need protection, so we bet strong to deter draws and overcards from continuing and improving, but they are too strong to just fold unless the action has red warning beacons all over it like this hand does.
I am guessing that your mindset was that you were excited to have JJ, got scared by the action but didn't want to fold so you 'compromised' with a flat and pray, but that is not a good strategy when you only have 2 outs, especially at this stack depth. This is a spot where we have to be a man, crap or get off the pot.
If the CO flat called, I would jam their butts, but with the 3-bet, fold is okay too. At least that is how I see it. I hope that this helps you.