Cloud is a financial model not a technology
If you can't build well on prem you won't be able to build well in the cloud - and vice versa.
If you are cutting corners on prem you'll try to cut corners in the cloud, only you won't be able to sweat assets in the same way.
If you have legacy and tech debt then you need to sort that out - if you sort it out on prem it will make your life just as easy as if you do it when you move to cloud.
Cloud is great if you have lots of opex but not much Capex. On prem is better if you have access to more Capex and less opex. The last really well justified cloud migration I did was at a startup that had to lease its servers on prem because it didn't have the Capex to buy them. They slotted in very well to the cloud financial model with the backing and blessing of the CFO. The worst cloud migrations I have done have been at companies with constraint on opex who didn't think through the reasons for doing it.