If the target creature becomes an illegal target before a Cartouche spell resolves, the spell doesn't resolve. It doesn't enter the battlefield.

Artwork
Loading artwork…
Cartouche of Knowledge
Foundations Jumpstart · #295 · EN
Nonfoil—Foil—
Card rules
Enchant creature you control
When this Aura enters, draw a card.
Enchanted creature gets +1/+1 and has flying.
Cartouches chronicle the initiates' achievements in the trials.
Common · Illustrated by Kieran Yanner
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Each Cartouche is an Aura with "Enchant creature you control." If another player gains control of either the Cartouche or the enchanted creature (but not both), then the Cartouche will be enchanting an illegal permanent and be put into its owner's graveyard as a state-based action.
Cartouche is an enchantment subtype with no special meaning. Other cards may care about which enchantments are Cartouches.