The legality of a spell’s targets is checked only as that spell begins to resolve. If the spell this card is spliced onto causes its targets to become illegal while it’s resolving (for example, by removing them from the battlefield), you’ll still draw a card.