Hermite equivalence of polynomials