Insight into covalent bonds from electrostatic perspective
I assume you mean from the classical electrodynamics side only, not from quantum electrodynamics side. By the former, even H atom cannot exist, as the electron would fall along a spiral curve on the nucleus, continually emitting radiation being radially accelerated.
For a hydrogen molecule, both electrons move around both protons, they are not dedicated to the one they came with.
Consider a similar case of charged macro objects, where applying the pre-relativistic classical electrostatics is justified. Imagine 4 respectively charged balls in gravityless vacuum.
The scenario in the bottom picture is one of the less preferred positions, having rather higher energy due short distance of negative charges. But there is plenty of different positions where the whole system would have lower energy than if they were 2 and 2 separately.
Note that even classical system have no general analytic solution for the motion equations for more than 2 objects.