Why do more substituted alkenes undergo epoxidation, but the less substituted alkenes undergo hydrogenation? We know that, in case of a choice, catalytic hydrogenation will hydrogenate the less  substituted alkene, because the less substituted alkene is less stable. But, we also know that, in case of a choice, peroxyacids perform epoxidation of the more substituted alkenes, because the latter are more electron-rich (i.e. more nucleophilic) (details)

In one case, we are favoring the stability of the pi bond. But in another case, we are prioritizing the nucleophilicity of the pi bond. Why is this so?

I believe this definitely has something to do with their respective mechanisms, which I've studied from Libretexts (hydrogenation and epoxidation). The only difference I see is that in hydrogenation, the pi bond first attaches to the catalyst surface, and then a hydrogen atom (already attached to that surface) is transferred to the pi bond. But, in epoxidation, the alkene directly attacks the electrophilic $\ce{-OH}$ group of the peroxy acid. So, this explains the need for more nucleophilicity in the latter case, but how does this explain the need for less stability in the former case? Or is this direction of reasoning entirely wrong?
As you already know, the alkene has to approach the catalyst surface in the first step. For optimum adsorption, the molecule must be able to orient itself parallel to the surface of the metal. Less number of substituents promote this.   


  The activated hydrogen is in the form of $\ce{Pt-H}$ or $\ce{Pd-H}$ bonds on the surface of metal particles, and hindered alkenes can't approach the $\ce{M-H}$ bonds easily.


Source

Epoxidation on the other hand is free from any such need for to attach to the surface. So we simply consider nucleophilicity.