It isn't going to cost me any more than if I had not seen the exposed cards. With trip-9's, and three spades on the board, it doesn't matter to me that the As was exposed since my hand is beat by any two hole spades. I might bet to see where I am, but if I am raised, I am done with the hand.
Now lets change the situation a bit. Same hole cards for everyone, same exposed cards, except the river card is the 2d. How much is that card going to cost the player holding the Ks Qs? That player now knows he/she has the nut flush, but with a pair on the board, should realize that the nut flush is no longer the NUTS and play accordingly. If I was the player with the nut flush, I would (or I should) play it exactly as above. At best I would bet to see where I was and if raised, let the hand go.
As to the amount of the bet, I need to make it enough to get rid of anyone not having a better hand, but yet small enough not to seriously damage my stack.