Hamiltonian simulation in the low-energy subspace