The Delta Reduction effect is attached to the Defending Pokemon that was attacked by Meganium. (The damage reduction effect states "before applying Weakness and Resistance", which means it's on that specific Pokemon.)
If Meganium retreats, the effect is unchanged, as it resides on the other Pokemon.