If one of the two target cards is an illegal target by the time Once and Future resolves, you'll put the other in the appropriate zone and exile Once and Future. If both targets are illegal, the spell won't resolve and you won't exile Once and Future.