What is the theoretical maximum speed of a rocket-powered aircraft in the atmosphere?
The upper limit is given by the L/D of the rocket-powered vehicle and its thrust.
In order to follow the curvature of the Earth so it will stay within the atmosphere, the vehicle must create enough downforce by flying inverted so it can bend its flight path enough to not escape to outer space.
A practical altitude for flying this way would be dozens of kilometers up in the higher atmosphere, so drag and heat loads stay manageable. For the L/D I use the approximation given by Dietrich Küchemann (replace with a more recent one if handy):
$$\left(\frac{L}{D}\right)_{max}=\frac{4\cdot(Ma+3)}{Ma}$$
which would result in an L/D of 4 for Mach growing very large. Add to this the effect of gravity and your maximum downforce is the weight of the vehicle plus four times its rocket thrust. This force now has to balance the centrifugal force which results from flying at constant altitude:
$$m\cdot g + 4\cdot T = \frac{m\cdot v^2}{R_{Earth}+h}$$
where $R_{Earth}$ is the earth radius of approximately 6367 km and $h$ the flight altitude above ground. Now solve for flight speed v:
$$v=\sqrt{\left(g + 4\cdot\frac{T}{m}\right)\cdot\left(R_{Earth}+h\right)}$$
By flying in dense air close to the ground the lift force will be immense, but so will be the required thrust. Since flight altitude is small compared to the radius of the Earth, the equation can be simplified with a small loss in accuracy:
$$v=\sqrt{\left(g + 4\cdot\frac{T}{m}\right)\cdot6.400.000 m}$$
A more precise result would now add the effect of Earth's rotation, so flying eastwards along the equator will reduce flight speed by 464 m/s and add the same amount to the speed calculated above when flying westwards.