If the spell was cast using flashback, Ertai's Meddling will still exile it with delay counters on it. When the card is returned to the stack, it still "remembers" the flashback cost was originally paid. It'll be exiled when it resolves or otherwise leaves the stack.