Really depends on your code base and project. Unreal upgrades can be painful if you're using APIs that can or are rewritten, and if you have made engine level changes.
Unity often feels like rolling the dice with upgrades, basic things can break from version to version, but I've done many Unity upgrades with no or minimal issues, and seen extremely painful Unreal upgrades