In most cases the character attacked (usually female) is written in a way that their trauma affected another character (usually male) more than them. When the victim is male it's usually a lead but in many cases they don't address what happened directly. It's mostly brushed aside, not really spoken of unless it serves a plot.
There are times it actually plays out seriously but those are pretty rare. Besides the writers ignoring the elephant in the room there are other problem some trends of writing. Such as acting as it's not such a big deal when the victim is male or playing the whole thing off for humor. This isn't going to be an essay per se but rather a look at how men are written in these situations where the assault happened or not.
Starman (Jack Knight)
This was one of the examples that took the serious road. Jack had taken up his fathers' legacy of Starman after avenging his brothers' death. By doing so he also created a new enemy with Nash, the original Mists' daughter and newest mantle holder. She wanted to make him pay for killing her brother and decided to go all out to become his arch-enemy. That included raping him while he was knocked out to conceive a child she planned on raising to hate him. Jack finds this out (or at least has this confirmed) via a letter Nash sent him after she gave birth to their son.
This one was more implied but was nevertheless used for a joke. In Hitman there was a character called Bueno who had the"power of perversion." Kyle couldn't remember what happened just that his drink was spiked and someone saying "Bueno" over and over again. The event made him cautious of going to Gotham. Many don't consider this canon.
Batman (Bruce Wayne)
Grant Morrsion wrote Talia Al Ghul drugging Bruce to conceive their own son Damian. Morrison admitted that he remembered the events he based his version on differently. Yet he still kept it in during his telling of Talias' backstory in Batman Inc. #2. This was done to make Talia the obvious
evil he had to fight. While Bruce freaks out the morning after it only seemed to be after he found out she was trying to get pregnant. He's called her out on it when she revealed he had a son but overall it's not something that the character addresses. Although it will be mentioned in another entry.
Nightwing (Dick Grayson)
This happened twice to Dick. The first time was with Mirage, a teammate that was attracted to him and loved to mess with Starfire. She changed her appearance to Starfire to engage in sex with him. She decided to reveal this fact to him in front of his teammates to "prove" they were meant to be together since he didn't realize it wasn't his lover. The reaction to this news? His teammates think it's funny, one going as far as calling him a slut. Starfire was the only one bothered by it saying that it wasn't right because Mirage tricked Dick. It was later played off as a love triangle.
Later on he came in contact with Tarantula (Catalina Flores) who developed an attraction to him. The feeling wasn't mutual since he wasn't impressed with her harsh crime fighting tactics. After getting her arrested Tarantula set about to ruin his life. During a fight between Blockbuster and Nightwing she shot and killed the super villain. After all the recent loss in his life and guilt over not being able to stop her, Dick went into shock. Tarantula used this to have sex with him against his will as he asked her to not touch him. This was especially infamous as writer Devin Grayson said it wasn't rape but non-consensual. Which is exactly what rape is. Dick never acted warmly towards her afterward but the subject was never properly addressed either.
Red Hood (Jason Todd)
This one is a little more vague than the rest. Originally the writer behind Jasons' death wanted to kill him off with Aids although I don't think they ever said how he would have contracted the virus. Judd Winick has said that there were things DC wouldn't let him do. Some thought this meant the character would be bisexual despite Winick saying the thought never occurred to him. I think he wanted to write that Jason was a child prostitute based on his encounter with former prostitute Mia.
Other writers have implied that this might have happened or that Jason was sexually assaulted. One of the most obvious being Tony Daniels' infamous message from Bruce during Battle of the Cowl. A message that was supposed to be the reason for Jason going off the deep end in the story. Bruce talks about a secret, something I don't think could be hidden if Jason sold himself on the streets.
Perhaps the editors don't want to deal with a boy wonder going through this ordeal or maybe they felt Jason has enough trauma but none of this has ever been confirmed.
Red Robin (Tim Drake)
From what I hear Tim has gone through this in Teen Titans with it looking like he isn't in his right mind when he's with Cassie (Wonder Girl.) But as the details are stretchy since I keep hearing different versions. For now I'll focus on a full out attempt by Ra's Al Ghuls' half sister. After Tim outsmarted Ra's the immortal foe got it in his head that Tim would make the perfect heir. But Tim turned him down which made Ra's think he should get Tims' future child. It gets worse from there as he doesn't plan on having a teen seduced to impregnate his sister (likely for the Al Ghul blood link) but actually force the issue.
Once captured this fact is made known to Tim who's unable to defend himself and is told he'll be killed afterward. The caption for the end of the issue? "What a way to go." The next issue starts with Tim trying to distract himself as this woman starts to get them undressed. Tim makes quips in his head about this being a "special episode" and thinking how this is how they got Damian. Things don't go further as he's lucky enough to have Cassandra Cain defending his honor.
Robin (Damian Wayne) ?
I was told about this one being in Detective Comics Annual #11 although I haven't read it. I wasn't going to put it on here since I haven't confirmed it. But since this seems to be a trend with the male bat characters it might be worth talking about. The naked lady above (who disturbingly looks like some of Talias' depictions with long hair) apparently want to make Damian "a man." I think she's connected to some mystical thing and Damian is clearly freaking out. Nothing happens but it's still pretty messed up.
Booster Gold (Michael Jon Carter)
This is the worst of the "played for laughs" version on this list. Booster was repeatedly threatened throughout Booster Gold #37, something I'm still amazed the writers haven't been called out for. This was a very uncomfortable issue for me to read through. Estrogina tells Booster their going to have sex, he declines, she says he doesn't have a say in it. Going on to say that he wouldn't survive the sex and after he escapes she swears revenge. This is all play for laughs. What makes this already disturbing story worse is the inclusion of Vril Dox at the same prison and how eerily similar Estrogina looks to another character.
Brainaic 2 (Vril Dox)
Stealth was a female character that met Dox in the very same prison as the above example. She was an alien with no memories of her past that was overcome with a strong biological urge to mate. This leads to her attacking Dox in a very brutal fashion that would end with her pregnant with their son Lyrl. Dox died during the act although he came back through comic logic but what happened was never treated lightly. In fact he would remind Stealth of it often even though their relationship took a turn after the birth of their child. Since Estrogina looked a lot like Stealth this made her threats to Booster and her comments on no one surviving the mating process even more disturbing.
This isn't all the accounts just a few of DCs' examples. This isn't a subject that should be treated lightly and seeing it written a dismissive way or with attempts to be humorous never really work.