Of course not there is no easy way to quantify such things. Sometimes Black is able to play safely some consolidating moves, sometimes White's pressure is enough to provide long-term compensation for the material and Black struggles to untangle, there is no rule, it all relies on a concrete assessment of the position (and a bit of calculation).
The only rule I can think of is that the sacrifice of a pawn in return for castling is quite often sound, even if the compensation can look rather vague.
Is there any easy way to quantise how valuable it is to prevent your opponent castling - e.g. a bishop exchange where they have to take with their king/rook?
For instance if you get the opportunity to do this but it reduces your position, is it worth it in order to weaken the king and 'trap' the rook in the corner?