If the target creature is an illegal target as Emergency Medical Hologram's ability tries to resolve, it won't resolve and none of its effects will happen. You won't gain life.

Artwork
Loading artwork…
Emergency Medical Hologram
Star Trek · #15 · EN
Nonfoil—Foil—
Card rules
When this creature enters, put a +1/+1 counter on target creature. You gain 1 life.
0/1
The EMH Mark 1 distills thousands of medical references and the experiences of forty-seven medical officers into a single unit, though its bedside manner leaves much to be desired.
Common · Illustrated by Kirk DouPonce
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Future Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Old School Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions