Earlier quoted context omitted.
If you do have to redo everything, why the hell would you switch to another proprietary technology?! Why not use OpenSceneGraph, OGRE, Irrlicht, Cube2, or one of the hundreds of other free game engines / frameworks out there instead?
Based on your comment it seems like you haven't looked into or used a game engine since the late 90s (Cube 2 and Irrlicht?). The only real open source competition for Unreal and Unity is probably Godot, and it's not really competitive. Many of the engines you mentioned (OSG, Ogre) are not full game engine, but renderers and scene graph implementations. For that something like bgfx or even three.js if you're targeting…
By continuing to buy UE you're just digging yourself a deeper hole for when things inevitably turn sour (as they just did for Unity).