Is Gale Shapley globally optimal?
No, Gale-Shapley optimizes a different set of criteria; see https://en.wikipedia.org/wiki/Stable_marriage_problem.  It maximizes the men's happiness, which doesn't necessarily maximize the total happiness sums.  It is easy to come up with counterexamples by taking any stable marriage solution where some woman doesn't get her first choice -- say, Alice's first choice is Bob, but she isn't assigned to Bob in the assignment output by Gale-Shapley -- and then making Alice's affinity towards Bob be some enormous number, far larger than all other affinities.

I don't know if it can be solved in polynomial time.  Without the stability requirement, it's an instance of the assignment problem.  With the stability requirement added on, I don't know whether it can be solved in polynomial time.