We derive a formula for the backward error of a complex number λ when considered as an approximate eigenvalue of a Hermitian matrix pencil or polynomial with respect to Hermitian perturbations. The same are also obtained for approximate eigenvalues of matrix pencils and polynomials with related structures like skew-Hermitian, *-even, and *-odd. Numerical experiments suggest that in many cases there is a significant difference between the backward errors with respect to perturbations that preserve structure and those with respect to arbitrary perturbations