This is a good example of a spot when PIO is of limited use, because the results will depend almost entirely on the range we assign to the villain. We don't want to fall into the trap of using PIO to rationalize our plays by running calculations with unrealistic ranges.
I think your mistake was to assign an unrealistic range to your opponent as you were going to the flop. The fact is villain was opening in late position and called a 3-bet in position. So he should likely have some 7s and 8s in his range (not 78o but heh).
Personally I like to start with a check on the flop. AA is less vulnerable to being drawn out on, so I like to check the biggest pairs and bet 99-JJ (probably some QQ too) as these smaller pairs benefit more from protection against over cards on the turn. Checking with AA and KK also helps protect our range by preventing villain from going crazy against our unpaired over card hands.
I know you said villain was loose passive, but if villain checks back flop, you can still get all the money in by betting turn and river. You also gain more info from villain, and the hand plays out totally different (doesn't mean you wouldn't still get stacked).
As played I definitely don't like the river shove. On a double-paired flush board with a K, I don't think it is realistic to hope for villain to call with 99-QQ. If the villain has a K he might call, but the only realistic K is AK (calls flop bet, but also sometimes 4-bets pre, and as you mentioned you block it). So I think you just have to check call river to pick off bluffs assuming villain bluffs enough. Honestly against a true loose passive I check fold river all day, and expect to win a lot when villain checks back.
Anyway, you ultimately just misread the villain's tendencies when you were assigning a range. It happens to the best of us
There's nothing to do but adjust our assumptions for next time.