What you want is a situation where you can get as much info as possible for as cheap as possible.
If someone raises early, even if they are not a credible raiser, it is better to fold in mid-position because you don’t know how the players behind you are going to react. You cannot assume pot odds with a speculative hand that is, on its own, weak. If would be different if you had something like AKs which has not only draw value but legitimate high-card strength if it ends up being only you calling the raise. Likewise, you do not know if someone behind you will re-raise, a situation where you will more or less always have to fold. This situation alone could be a leak if not avoided whenever possible.
If there is no raise, and everyone limps to you, you could limp as well…though if you know any of the players behind you to be aggressive, you might be wary. It depends on the players here, how aggressive they are after the flop, things like that.
The thing to remember, which you probably know, is that these situations are not easy. These are hard hands to hit, and when you do hit them, there are few scenarios where it will have been worthwhile to be chasing after them in the first place. You need to hit your hand and have others hit something as well; the lower your draws or pairs, the less likely it becomes that someone else has hit a worse hand that they are willing to stick with.
Choosing to play these hands, as well as knowing HOW to play the hand if you make it, depend entirely on the game you are in – the situation itself. More often than not, these hands in mid-position are not worthwhile, as you have too little information about how this hand will go when the action comes to you.
If this is in fact a leak for you, sealing it is a matter of keeping in mind that these are hands that have no ability to withstand a raise. Stick more with higher pairs/suited connectors, and in late position or in the blinds. Most leaks are the result of playing loose in early positions. Especially in tournament play, these can prove fatal.