We consider regular polystable Higgs pairs (E,ϕ) on compact complex manifolds. We show that a non-trivial Higgs field ϕ∈H0(End(E)⊗KS) restricts the Ricci curvature of the manifold, generalising previous results in the literature. In particular ϕ must vanish for positive Ricci curvature, while for trivial canonical bundle it must be proportional to the identity. For Kähler surfaces, our results provide a new vanishing theorem for solutions to the Vafa--Witten equations. Moreover they constrain supersymmetric 7-brane configurations in F-theory, giving obstructions to the existence of T-branes, i.e. solutions with [ϕ,ϕ†]=0. When non-trivial Higgs fields are allowed, we give a general characterisation of their structure in terms of vector bundle data, which we then illustrate in explicit examples.