The "enters" ability has only one target. The other permanents with that name aren't targeted. For example, a permanent with protection from white will be exiled if it has the same name as the target nonland permanent.

Artwork
Loading artwork…
Detention Sphere
RNA Guild Kit · #10 · EN
Nonfoil—Foil—
Card rules
When this enchantment enters, you may exile target nonland permanent not named Detention Sphere and all other permanents with the same name as that permanent.
When this enchantment leaves the battlefield, return the exiled cards to the battlefield under their owner's control.
Rare · Illustrated by Kev Walker
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander 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
If Detention Sphere leaves the battlefield before its "enters" ability has resolved, its leaves-the-battlefield ability will trigger and do nothing. Then the "enters" ability will resolve and exile the targeted nonland permanent and other permanents with that name indefinitely.
Although the target of the "enters" ability must not be a land, lands with the same name as that permanent will be exiled.
If the target nonland permanent is an illegal target when the "enters" ability tries to resolve, it won't resolve and none of its effects will happen. No permanents will be exiled, including those with the same name as the target.