If the nonland permanent is an illegal target at the time Excise the Imperfect tries to resolve, it won't resolve and none of its effects will happen. Its controller won't incubate.

Artwork
Loading artwork…
Excise the Imperfect
March of the Machine Commander · #14 · EN
Nonfoil—Foil—
Card rules
Exile target nonland permanent. Its controller incubates X, where X is its mana value. (They create an Incubator token with X +1/+1 counters on it and "2: Transform this token." It transforms into a 0/0 Phyrexian artifact creature.)
"Riddles are but petty diversions. Phyrexia is the only truth."
Rare · Illustrated by Denis Zhbankov
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions