This is the way I would think about it.
Let $\hat{H}$ be the Hamiltonian operator, whose eigenvalues are the allowed energy levels of the system. The formula you stated in your question has $\hat{H} = \frac{\hat{p}^2}{2m} + \hat{V}$. But this is only valid for a single particle, and so to be super explicit we could write $\hat{H} = \frac{\hat{p_1}^2}{2m} + \hat{V}(r_1)$ to make sure that we understand that the operators are acting on the coordinates of one particle.
For an N-particle system the Hamiltonian takes the form:
$\hat{H} = \sum \limits_{i=1}^{N} \left(\frac{\hat{p_i}^2}{2m}\right) + \hat{V}(r_1,r_2,...,r_N,t)$
where t is time.
Hopefully this makes sense: the energy is determined by the sum of all the kinetic energies of each particle, plus a potential term which represents the interactions between the particles. For example, this potential term could be the sum of all the electrostatic interactions between charged particles.
Now we can see that the Hamiltonian in this form doesn't neglect the internal energy: it includes the total KE, plus any energy stored in the interaction between particles. The sum of these two is precisely the internal energy of, for example, a gas.
I hope that helps, and if I have misunderstood your question please let me know.
Sources: https://en.wikipedia.org/wiki/Hamiltonian_(quantum_mechanics)
Extra Notes:
I agree with Matt Hanson's comment. I think the point is that a definition of "internal energy" is not needed in QM (i.e. there is no point differentiating between the energy of individual particles and the energy of e.g. COM of the system). It is useful in thermodynamics but not here. Thermodynamics is in a sense "less fundamental" than QM. Thermodynamics makes approximations and assumptions, and we need more terminology for exactly what part of the system we are describing. QM doesn't make assumptions about the system (or at the very least it makes very few): it is the most complete description of particles we have and only cares about total energy.