Is the energy really infinitely large in a measurement of the energy immediately after the measurement of the position? For instance, assume the particle rests on the ground state $\psi_0 (x)$ of a one-dimensional simply harmonic oscillator around the origin of axes $ x=0 $, and once we measure the position of the particle and happen to obtain a definite value $ x=0 $. Now, we immediately measure the energy on this eigenstate of the position $\delta (x)$. The energy is divergent. To see it, let us expanding this delta function in terms of the stationary states $\psi_n (x)$ of the harmonic oscillator, we obtain the expansion coefficients that are the stationary states at the point $ x=0 $, $\psi_n (0)$. The energy is thus $\sum_n |\psi_n (0)|^2 (n+1/2)\hbar \omega $ which is divergent.
There is an interpretation of the absurd result: Once one measures the position of the particle with great accuracy, he drastically changes its momentum. Thus kinetic energy is transferred to the particle. 
In order to remove the infinitely large energy, I prefer an alternative interpretation: In quantum mechanics, the measurement of the energy immediately after the measurement of the position is illegal. 
Am I right?
 A: For this answer I will (at the OP request) make two assumptions: 


*

*Standard Quantum Mechanics is a complete theory of nature   

*When I do quantum measurements there are no classical experimental uncertainties i.e. I am as good an experimental physicists as quantum mechanics itself allows


Now the OP ask me to perform a position measurement on a particle in a potential well. To do this I will need to arrange for some form of interaction with the particle, say I send a photon into the well which interacts with the particle. I then set up photographic plates around the well (or whatever - I'm really a philosopher - don't bore me with all this) and by "measuring" the photon I obtain knowledge about the position of the original particle. In effect I have "measured" the original particle.
Now we've got the messy experimental stuff out the way, we can get back to quantum theory! Now I have some knowledge of the position of the particle I can use the knowledge in my Schrodinger equation to predict its future evolution. Where before the measurement I had a wavefunction spread out all over the well (I had no knowledge where it was), now I know where it is: I can perform "wavefunction collapse" and continue the evolution of the particle from that new wavefunction with localised position. Key point: this wavefunction collapse is not itself a physical process - this is just me obtaining more knowledge of the situation I am now dealing with.
Now you can ask what is wrong with your argument: how localised can you really make the wavefunction after the measurement? Even as a perfect experimental physicist you had to perform an interaction of the particle with a photon. From a different viewpoint, we can think of this interaction not as a measurement but simple as a quantum mechanical interaction. If you could do all this (I can't) you would find the couplings that are produced between the states of the photon and the position states of the original particle at not so well differentiated that doing a precise measurement of the photon state will not allow you to infer the exact position of the particle. 
So in summary, the mathematical structure of quantum mechanics does allow you to meaningfully talk about a position delta function (with infinite uncertainty in momentum and hence infinite energy) but analysis of the complete interaction theory of quantum mechanics reveals that no interaction process would carry away information to allow you to represent a particle using a position delta function. In short you can't, even in theory, measure a particle with infinite precision. In detail what you find is that the higher frequency (shorter wavelength) of the photon the greater precision, but as you know to get an infinite frequency photon would need infinite energy. So the infinite energy constraint comes in at the start, prohibiting the measurement in the first place.     
Clarification
As with everything in quantum mechanics, we should not talk about the results of the single measurements but consider an ensemble of identical measurements and the distribution of results we expect to get.
In this situation suppose the particle is initially described by a Gaussian wavepacket with variance $V_x$. Then by Fourier transform or applying Heisenberg uncertainty principle the variance of momentum $V_p = \frac{\hbar^2}{4V_x}$. Now we design and perform a photon probe experiment which is designed to increase our knowledge of the particles position (apparently measuring the photon phase change or the reflection time are good ways to measure the particle position but the argument here is general). So, by design, our physical measurement process  results in a new particle wavefunction with smaller $V_x$ and therefore necessarily larger $V_p$. Now the momentum expectation value is unchanged by the measurement, in other words the change in momentum is completely random. However the average kinetic energy is proportional to the square of the momentum, so the measurement increases the kinetic energy on average. i.e. on average the photon necessarily adds energy to the particle (this change is called the back-action of the measurement).
This is what actually happen with real finite energy experiments. Now we can use this calculation to argue that it is impossible to design (even in principle) an experiment which results in $V_x = 0$ (a delta function). For to do so would require the photons, again on average, to add an infinite amount of energy to the particle. And you cant do infinite energy (average or no average).      
A: Nothing is wrong here. The exact measurment of a particle's position requires an infinite energy "probe", e.g. a photon who's energy is $\lim_{\omega \rightarrow \infty} \hbar \omega $ infinte, which will in turn result in an infinitly high momentum transfere, and thus an infinite particle energy.
However, if you believe that no such infinite energies exist, there is no way to measure an exact position in the first place. What this all amounts to is that there is no way for an experimentalist to test the Heisenberg uncertainty principle
$$ \Delta x ~ \Delta p \ge \frac{\hbar}{2} $$
in the limit $\Delta x \rightarrow 0$. So the question is rather philosophical. Which of the properties are disallowed or allowed, e.g. infinite probe energy or the resulting infinite particle energy or the exact position measurment, is not important since in the context of quantum mechanics and experimental limitations (finite energy), they can never be tested. As such, these limits should be avoided when calculating measurable results and only done in the last step as an approximation or simplification.
A: Thanks to @Mark Mitchison, @Mikael Kuisma and @NowIGetToLearnWhatAHeadIs for discussions. I now present a brief answer to the question.
From theoretical consideration, by the position measurement on a quantum state $ \psi (x) $ defined in a spatial interval, we mean that, one of the positions, say, $x’$, is obtained, and the quantum state is collapsed into the state $\delta (x-x’)$. It is theoretically true. Next, if one tries to measure the energy of the particle on the collapsed state $\delta (x-x’)$, the energy is infinitely large. So theoretical prediction shows that the measurement of the energy on the state $\delta (x-x’)$ is impossible.
From point of experiment, the position measurement results in an approximate "collapsed" state, say, $1/\epsilon$ defined over small interval $ x\in (x’-\epsilon/2, x’+\epsilon/2)$, thus the immediately measuring the energy of the particle on this state is possible because of the predicted energy is finite with finiteness of the $\epsilon$. 
