Needs ECU reflashed sounds like code for "we have no idea".
By "new engine" do you mean new in a crate from Rover, a reman or a used engine from a yard? Guessing a used engine. As problem prone as these engines are, the chances of finding a good one are slim. The major recyclers won't even touch them. At any rate, the ECU is getting information that is telling it something. If there are differences between what was in the vehicle and what's there now, that could be your problem. Or it could be just a vacuum leak. The issue you have is that whoever did the work doesn't have a clue what they were doing and they've left you in a mess. An 02 Freelander with a bad engine should have never been repaired in the first place and a reputable shop would have told you that. Now you don't have enough in the game to be worth suing. Try small claims court and dump the FL for what you can get. It's not going to get any better. If you take it to another shop that actually knows what they're doing, it's going to cost you $$$. That's if they'll even touch someone else's mess.
Sorry. Wish you'd have come here before seeking repair.