So, shouldn’t the order be the other way round?
Yes, it is the other way around. Ketones (pKa ~ 20) are more acidic than esters (pKa ~ 25). The figure below shows the resonance structures for the enolate anion of a ketone and an ester. Resonance structures II and IV stabilize the enolate anion in the ketone and ester respectively. In the ester, there is an additional resonance structure, V. Through resonance structure V, the alkoxy group in the ester donates electrons to the carbonyl. This movement of electron density towards the carbonyl will tend to destabilize the formation of any negative charge on the carbon attached on the other side of the carbonyl (electrostatic repulsion). This reduces the likelihood of the formation of an enolate anion on that carbon. Therefore, in the ester, to whatever extent structure V contributes, structure IV will contribute somewhat less. Hence, the ester enolate anion resonance structure IV plays a smaller role and the enolate anion is less stabilized in the ester compared to the ketone. Consequently, the ester is less acidic than the ketone.