I think you played the hand fine. River is close between call or raise. I'd probably call given he overbet. If he bet normally, I might be tempted to shove.
Given his overbet, I would expect to see nut flush, boat or random air.
Hero raised flop. You think villain b/c w/ AJhh+A9hh? Other nut flushes make no dense to get on river
May Be wrong but vast majority of 5nl will not just call that flop w/ 2pair+.
All posts are just my own opinion about a hand or a general situation... not advices on how you should play...