It really depends on your opponent whether or not you're looking to continue to stack off with an overpair facing a raise.

Take a player thats 23/4 (although the vp$ip/pfr isn't quite as important since these are preflop stats) and has an aggression factor of 0.5. Generally speaking, this player is highly unlikely to raise when bet into unless they have the near nuts (like a set). This is your typical postlfop station that's not going to get maximum value from their holdings.

Then there's your laggier type. Let's say 32/25/ with an agg. factor of 4-6. These players are going to be raising alot more than just the nuts. Typically when the board is draw heavy and you face a raise while oop vs a Lag it's probably fine to stack off with your big pair.

In the situations you posted, its hard to see a 9/6 nit raising you with much less than a set here (or possibly QQ+) so your behind that range. Although if you've been c-betting alot you may expect worse to raise into you, so I suppose the decision to continue would be based alot on how your opponent perceives you. From what I've seen though most players that tight are just playing their cards.

In the second hand it's really good to know the player your facing because if he's a station postflop you're usually beat to a raise because if the station has the flush draw, he's c/c not raising. However if he's laggy then you're probably ahead to alot of a 'standard' aggressive players range. Without reads I'll probably stack off here to half-stacker. 100bb deep I'd might lean towards folding and pay close attention to what villain does in later hands.