The factors that lead to overspend/underspend can be categorized into two: controllable factors and external factors that cannot be easily controlled. Also, depending on the type of advertising, the reasons vary. Facebook can have some very different reasons for overspend compared to Search.
For the sake of simplicity, this answer focuses Search.
The attached decision tree will give a good idea of what should be analyzed in case of an overspend. This flow chart focuses on controllable factors which are actionable.
It also gives us some idea of the kind of analysis we need to do for Underspend -- which can be caused due to various factors like new launch (where footfall to site, quality score etc. is yet to build), seasonality, shift in the competitive landscape, drastic changes in budget (and the time it takes to adapt to the new budget landscape) etc.