We consider integral models of Hilbert modular varieties with Iwahori level structure at primes over p, first proving a Kodaira-Spencer isomorphism that gives a concise description of their dualizing sheaves. We then analyze fibres of the degeneracy maps to Hilbert modular varieties of level prime to p and deduce the vanishing of higher direct images of structure and dualizing sheaves, generalizing prior work with Kassaei and Sasaki (for p unramified in the totally real field F ). We apply the vanishing results to prove flatness of the finite morphisms in the resulting Stein factorizations, and combine them with the Kodaira-Spencer isomorphism to simplify and generalize the construction of Hecke operators at primes over p on Hilbert modular forms (integrally and mod p). The vanishing results also provide an ingredient for forthcoming work with Sasaki, associating Galois representations to mod p Hilbert modular eigenforms of non-paritious weight (for p ramified in F ).