Lu of Ayakashi Triangle knows of Matsuri as her girl friend and Shirogane as a stray cat that hangs around school. In both a straight example and an inversion, she ends up falling in love with "Shiromatsu", who's actually Shirogane shapeshifted into Matsuri original, male form.
In Battle Spirits Shonen Toppa Bashin, both Striker and Bashin love My Sunshine but have no interest in her alter ego, Suiren. Despite indication that Suiren is interested in both of them.
The manga / anime Cat's Eye: The main characters are barmaids and part-time Spy Catsuit thieves. One of them has a boyfriend, who happens to be a police officer, and who cannot make up his mind if he likes his girlfriend or her Secret Identity more. (This, obviously, is the cause of much frustration on the main character's part.)
In Code Geass almost all of Lelouch's love interests have this.
Action Girl Kallen has a Bodyguard Crush on Lelouch's masked identity, Zero, but has a very low opinion of Lelouch, mostly because he cultivates a reputation for being an apathetic jerk. When Kallen dramatically learns Zero's true identity, she gets a Heroic BSoD because she wonders if the whole Black Knight rebellion was a big farce. In season 2, after still going through a "you're Lelouch when I hate you and Zero when I love you" kind of relationship for some time, she comes to love both of them.
Shirley loves Lelouch Lamperouge but hates Zero for killing her father.
C.C. loves Lelouch vi Britannia but frequently mocks Zero for being a fraud. The difference is that C.C knows they're the same person from the very start.
Crossplay Love: Otaku x Punk: Both main characters are Crossdressers who are attracted to each other's fem alter egos, without knowing they're not actually a girl. In their normal lives, they don't like each other's male identities at all.
D.N.Angel has a love triangle revolving around this trope. Daisuke has a crush on Risa, but she rejects him because she wants to date someone "cool". Enter Dark—who is actually Daisuke's alter-ego. Just to make things more complicated, Dark actually has a separate personality and is a big flirt to boot, so Daisuke and Dark sometimes end up in a fight over Risa. Later on in the manga, the situation reverses as Daisuke realizes that the one he really loves is actually Risa's twin sister, Riku. Riku cares for him in return, but in a twist, she hates Dark and thinks he's a pervert. This causes all sorts of complications, since Daisuke's family curse won't leave him until he's completely loved for who he is—which includes the part of him that's like Dark. It's still complicated because Dark is in love with Riku, who's in love with Daisuke. Eventually—in the manga—he begins to reciprocate Risa's feelings, although knowing that they could never be together because he'll disappear once Riku accepts that Dark is a part of Daisuke.
In Deadman Wonderland, Ganta was unaware that his beloved Shiro was the true identity of his arch-nemesis, The Red Man. When he finds out, it's not pretty.
Dragon Ball Super: In the Super Hero saga, Trunks keeps trying to ask Mai out, but she keeps blowing him off and dismissing him as an idiot. When he later rescues her in his Saiyaman X-1 persona, she gets a crush on him, not recognizing him but comparing him to her first crush, Future Trunks.
The Guy She Was Interested in Wasn't a Guy At All stars Aya Oosawa, a girl who gets a crush on the clerk at a record store she goes to, a seemingly handsome man a few years older than her. However, not only is the "man" actually a girl, but she's none other than Aya's classmate Mitsuki Koga; the two get along but aren't exactly close. When Aya finds out that Mitsuki has the same playlist she sent "Onii-san," she's crushed.
A strange case in Hayate the Combat Butler, Luca appears to have started to fall for Hayate's alterego, but shows no signs of being a lesbian. She'll probably be relieved to find out that Hayate is actually a guy, though probably unhappy about having to deal with his Unwanted Harem.
Umaru has this issue with her friends in Himouto! Umaru-chan. Umaru presents a persona of The Ace at school, but at home she is a Lazy BumOtaku. Her best friend Ebina is friends with "Outside-Umaru", but has never seen "Inside-Umaru." Kirie has befriended both, wrongly believing that "Inside-Umaru" is actually Umaru's little sister Komaru. The straightest example is Sylphin, who met Umaru while the latter was in her "masked gamer" identity of U.M.R.; they become so close that Slyphin recruits her to help her in her Friendly Rivalry against Umaru.
Jewelpet Happiness: Mouri has a crush on a punk girl who once entered the Rock Cafe. That girl was actually Proper Lady Nene, who took on that disguise to analyse what made the Cafe so successful. Mouri eventually starts crushing on her too, but doesn't learn the truth until much later in the series.
Jewelpet Kira Deco!: Io has a crush on his teacher Coarumi, who is actually Coal in disguise and drag. Io hates Coal for taking up Opal's time.
Jewelpet: Magical Change: A boy named Souya falls in love with Larimar in her human form. When Larimar turns back into a Jewelpet after having to use magic to save him, he thinks she has gone away and leaves in disappointment. He learns the truth in a later episode and is fine with it.
Kaitou Saint Tail offers us a rather complicated example: as the Phantom Thief Saint Tail, Meimi starts falling in love with Sympathetic Inspector Antagonist Asuka Jr., but believes that he'd never have interest in her outside their Foe Romance Subtext and would even get angry if he learned her identity. Meanwhile, Asuka Jr. is falling in love with Meimi, but because he's started suspecting she might actually be Saint Tail and is worried about whether she's okay in there, this manifests in him getting even more obsessed with catching Saint Tail to confirm his suspicions, further convincing everyone at school, Meimi included, that he only has interest in Saint Tail and nothing else (with the anime taking it a step further by laying on thicker Ship Tease between him and Saint Tail). Eventually, the fact he's so hung up about this sends him into a Love Epiphany, shocking Meimi when he goes up to her and abruptly drops a Love Confession on her, but she's still convinced he must have preferred Saint Tail well into their relationship until he finally manages to get the truth through her head.
In Kämpfer, Natsuru loves Kaede and Kaede loves Natsuru. The catch? Kaede loves THE FEMALE NATSURU! To make things even more ridiculous, Kaede is under the impression that the male Natsuru is her love rival. It turns out she knew it all along because she's the Big Bad. And she really wants only the female Natsuru.
Magical Project S: In one episode, Konoha uses Sasami's baton. She puts Hiroto under a love spell, but he only falls for her transformed self, Funky Connie.
Kaito in Mermaid Melody Pichi Pichi Pitch is confused between Lucia and the pink mermaid. The anime plays it as a straight Two-Person Love Triangle, but the manga version is a little more complicated in that Kaito does actually suspect that she's the mermaid; it's just that as long as he's not completely certain about it, he's torn between "committing to the girl in front of him" and "fulfilling The Promise he made to the mermaid to find her", and he's going to have to pick one or the other as long as Lucia's still hiding things from him as part of The Masquerade. Even after they get together about halfway into the first arc, Kaito confirming that they're the same person after all is an immense relief to both of them.
The manga also adds a potential variation in backstory with Rina's boyfriend Hamasaki, whose family tends to a shrine made to honor a mermaid who saved the life of one of his ancestors. After meeting Rina, he starts to suspect that his ancestor may have married that mermaid... and, due to the Geas forbidding mermaids from revealing their identity to humans, said ancestor was likely none the wiser, meaning Hamasaki has no way of knowing if this is actually the truth or not.
Noel in Mint na Bokurapretends to be a girl to attend the same boarding school as his sister. When he runs into his crush on a day he's not wearing a dress and wig, he tells her that he is "Noel's cousin Tohru". "Tohru" begins dating her. She dumps him when the truth comes out.
In the initial anime PV for Miraculous Ladybug, we've got it twice over. Genki Girl Marinette is in love with the brooding intellectual Felix, but he can't stand her. However, when he transforms into Black Cat, he's swooning over Ladybug, who snubs him. Ladybug, of course, is Marinette. (Compare in Western Animation.)
In Monthly Girls' Nozaki-kun, many guys can't stand Seo, but are in love with 'Lorelei' from the music club... who is Seo, or at least her singing voice; the chief victim of this is Nozaki's junior Wakamatsu. In an inversion, Seo doesn't particularly seem to care either way, and if anything enjoys destroying people's fantasies by revealing who she is.
Yuuki in Mugen Densetsu Takamagahara: Dream Saga is actually the main character, and all over both Takaomi and "that other guy named Takaomi with the same mark on his head but a totally different personality".
Natsumi from Nicoichi initially fell for the female persona of the protagonist Makoto, not knowing his true identity, which greatly confused her. To complicate matters, Natsumi actually disliked Makoto in his normal self, which created lots of problems for Makoto when he was trying to reciprocate the love.
In Onidere, the female protagonist uses an alter ego called Angie to get close to her boyfriend without ruining her reputation as the school's top delinquent and is afraid of losing him to her alter ego, unaware that he figured it out the moment he met her alternate persona. And then another boy named Souta develops a crush on Angie.
In Phantom Thief Pokémon 7, Nazuna is in love with Pokemon 7. She's not quite so fond of Hiori.
In Pokémon the Series: Sun & Moon, Professor Burnet is certainly in love with Professor Kukui, but also has a serious celebrity crush on the Masked wrestler/trainer Royal Mask. She doesn't find out the truth until after they got married, but suddenly discovering she's married her crush completely blows her mind.
In one episode of Futari wa Pretty Cure, a boy asked Nagisa out, only to eventually dump her because he'd decided he preferred Cure Black. An unusual case in that Nagisa never actually liked him back, but the same idea.
Daisuke from Fresh Pretty Cure! plays with this. He admires Cure Peach and thinks that Love should strive to be more like her, not knowing that they're one and the same. However, his admiration for Cure Peach is just that - admiration - and he instead has feelings for Love, whom he's a Tsundere for.
In HeartCatch Pretty Cure!, Tsubomi falls head over heels for a mysterious handsome young man who, later on, resembles her late grandfather when he was younger. Sadly, she's crushed when she comes to find out that he's her grandmother's fairy partner, Coupe.
In Princess Tutu, Mytho is enamored with the eponymous Magical Girl, but only considers Ahiru a good friend. (One that he can "tell everything to", but a friend nonetheless.)
The Quintessential Quintuplets: Due to a series of misunderstandings, Nino falls in Love at First Sight with Fuutarou's "cousin" Kintarou (who was actually Fuutarou himself wearing a blonde wig). Given the fact that she took to hate Fuutarou from the beginning, she struggles to accept her feelings once she learns the truth.
Rosario + Vampire is something of a subversion of this trope. Tsukune falls in Love at First Sight with Outer Moka, but he's at least quite fond of Inner Moka, and has recently said that "he'd like the two of them to become one". Take that as you will. Ultimately that's exactly what happens, though both Tsukune and Inner Moka think that Outer Moka died when the Rosario was destroyed.
Sailor Moon. In the first anime, Usagi/Sailor Moon loves Mamoru/Tuxedo Mask, while he has a mysterious need to protect Moon. Usagi can't stand Mamoru, who also seems to dislike "Odango Atama". At the same time, he's in love with the mysterious princess of his dreams who is actually Usagi's past self. In the second season, there's also the Tsukikage no Knight, whom Usagi loves while she also loves Mamoru/Mask, though he turns out to be the astral-projected manifestation of Mamoru's love for Usagi when his memories are sealed. The manga is even worse, because Usagi and Mamoru actually like each other there before learning each other's identities.
And Usagi/Serena's little brother Shingo/Sammy idolizes Sailor Moon but can't stand his sister.
Tadase in Shugo Chara! likes Amulet Heart, Amu's heroic form. His feelings toward the normal Amu are "just friends". This one is especially weird because he knows from the start that the two are the same person and even tells Amu herself about his confused feelings. Later he confesses that he actually loves Amu for who she is, not her alter ego.
In Sonic the Hedgehog, Amy was the girlfriend of Nikki, but not of his superhero alter ego, Sonic the Hedgehog. Amy would eventually become part of the main franchise, along with another friend called Charmy.
A rather peculiar take on this appears in Super Pig. The main character Karin has a crush on her Junior High School soccer captain Kouichi Mizuno. He is in love with her secret identity Buurin. But she is a pig in that form! Add in the issue of Karin being stuck as Buurin if anyone finds out about her secret identity, then you have yourself a very peculiar conundrum. When Kouichi, along with Karin's classmates, finds out that Karin is Buurin, he is upset by this revelation. After fighting his own Demonic Possession, he comes to love her again.
Suguha in Sword Art Online begins to fall in love with her brother Kazuto (who is actually her cousin) whom she knows is in love with another girl. In order to forget about those feelings for him, she tries to fall in love with an online person she met called Kirito. Kirito is Kazuto's online persona. When she figures this out, it breaks her heart since she's fallen in love with the same person twice.
Tokyo Mew Mew complicates things. Ichigo loves Masaya, who loves Ichigo but also Mew Ichigo, and then in comes Ao no Kishi, and he loves Mew Ichigo, and she's stuck between not only this guy but also her Unwanted Harem. Then comes the traditional trial of every Magical Girl's Mysterious Protector, and we know that can't be good.
Gou is in love with his classmate, School Idol Kasumi. She finds him to just be childish and annoying (at least at first), and instead loves the driver of Sonic/Cyclone Interceptor. Who is Gou, of course.
Sala is in love with the driver of White Crystal Hope. White Crystal Hope is driven by the twins Jin and Mikoto, both of whom are implied to have crushes on her.
For a few episodes of Wedding Peach, Yuri/Angel Lily is confused about her feelings for both Yanagiba and Limone. Guess what the next reveal is.
Subverted in Wild Rock. Yuuen thinks he's doing a much better job at being a woman than he actually is and assumes Emba's in love with that side of him. He's not.
Anzu/Téa in the Yu-Gi-Oh!manga and anime is frequently confused about whether she's in love with Yugi or "the other (Yami) Yugi."
Zig-zagged - the fact that Yami is Yugi's alter-ego isn't a secret for that long, so she knows that they're the same person. However, initially both Anzu and the gang thought that the Other Yugi was just a split personality brought out by the Puzzle, and Anzu in particular thought that the 'true Yugi' was a mixture of both. After learning the Other Yugi is actually another person, she focuses her attentions on the Pharaoh until the end of the manga. The anime adds more Ship Tease between Anzu and Yugi as well, but the situation is resolved ambiguously in both versions.
Yubisaki Milk Tea first play it straight when Wataru fall in love with Yuki, the alter ego of his best friend Yoshinori, the main protagonist. Later an odd example comes to when Yoshinori realise that he is in love with his OWN alter ego. Both causes a few issues.