Preflop this is a non-steal situation and the guy is very loose-passive with a 3bet of 2% and not too short. You should be folding JJ and worse here, and 4betting-calling AA to 28bb. With QQ you can call and call on a non-A/K flop assuming he doesn't bet huge, with A high flops being worse for you than K high flops, and then folding to a turn cbet unless you have a set or he bets very small, I think. With AK you can call preflop and float the flop assuming he doesn't bet huge, and then bet the turn when checked to, to fold out AK, although it seems strange to be floating AK that often on the flop. With AK it's important to remember that facing QQ+/AK ... on an Ace high flop you beat 9 combos, tie 6 combos, and lose to 1 combo ... but on a King high flop you beat 6 combos, tie 6 combos, and lose to 4 combos ... so facing a turn shove with TPTK you will either tie or lose, which factors into the EV of turn and river actions, since if you are losing or tying, you better be tying enough of the time to make a +EV decision to call turn shoves. With KK you can call and then generally just call a flop bet, although if there is an A or K or he bets very small or very big then your action may change, and with KK I'm more confident on the turn facing a cbet although not sure yet if you should raise or call a turn cbet it depends on the situation. I'm not 4betting KK preflop because I'm not sure how this guy will handle QQ/AK facing a 4bet here, plus a call with strengthen your calling range. Fold AQs. Generally I'm thinking this guy has QQ+/AK although it's possible he may have JJ a very small portion of the time, and even less TT/AQ or some bluffs/dumb stuff, the guy's range is very very strong to 3bet here.
Check behind on the flop. If you bet then he will call or raise with KK+/AK which aren't folding to a triple barrel. QQ is calling a bet and possibly two. I doubt he has JJ but he isn't folding to a flop cbet. Overall I am very suspicious of the flop check, just take the free card since he is usually trapping you.
When you get raised it's clear he has KK+/AK. Your only outs are the flush card outs, and less if he has KK since you are drawing dead on the 9 of spades turn card. You have 8-9 outs for the turn card, that's 5.5 to 1 to hit 8.5 outs on the turn. You have 3.5 to 1 pot odds and 5.9 to 1 implied odds if a flush card comes on the turn since I doubt he can fold KK+/AK to a flush turn, and I'm accounting for the 9 of spades and KK as well.
Calling is better than folding to the raise, and I would recommend checking behind on the flop next time. Call a shove on a flush turn including the 9 of spades, but fold to a shove on an off suit Ace turn. But let's check to see if you should 3bet the flop, although I doubt it since I think his range is too strong plus dominates your hand as far as pair outs go.
...
By my calculations, calling the check-raise is better than shoving, because I believe you have no fold equity. Here are my calculations:
------
CALLING THE CHECK-RAISE:
Assuming:
-Opponent always has KK+/AK
-You call
-Opponent shoves all turn cards
-You call any spade turn including the 9 of spades
-$3 total rake in the hand, you pay half
08/47=17%(non-9 spade)
-95.45% = +$39.30 ... +$06.38
-04.55% = -$41.80 ... -$00.32
01/47=01%(9 of spades)
-73.19% = +$39.30 ... +$00.61
-26.81% = -$41.80 ... -$00.24
38/47=82%-$20 ... -$16.17
...
...=-$09.74 EV
......
3BETTING ALL-IN:
Assuming:
-Opponent always has KK+/AK
-You shove
-Opponent always calls
-$3 total rake in the hand, you pay half
-34.86% = +$39.30 ... +$13.70
-65.14% = -$41.80 ... -$27.23
...
... =-$13.53 EV
------
There were some basic assumptions I made, which may be off, various turn actions are not 100% clear, and there are very small rounding errors, but based on my calculations and estimate of his range, etc, I would call and not 3bet the flop. Fold to the preflop 3bet next time and check behind the flop next time. Good luck, Yojimgari