Do we understand when metaheuristics are optimal? (gradient descent & simulated annealing in particular)
In general, we definitely don't know this. In fact, it's practically always so that a-priori, we don't know how well a particular metaheuristic performs (let alone proving optimality) on a given instance (or family of instances) until we try.

It should also be noted that we usually go for metaheuristics only when the problem is so hard it seems unlikely it admits an algorithm that is always fast and correct (i.e., the problem is NP-hard). Put differently, when a problem is solvable in polynomial-time with some other methods, we don't even bother considering metaheuristics.

So if a metaheuristic is always optimal (and assuming it always runs in polynomial time), then the problem must be in P (assuming that P is not equal to NP). Of course, no one is stopping you from taking a problem that is known to be in P and applying a metaheuristic on that, but that's probably not that useful anymore.