I agree. That is certainly information they won't share with an ex boyfriend (or anyone other than possibly the next of kin, and maybe not even them). HIPAA limits disclosure to what is necessary, and telling next of kin that their single female relative is pregnant isn't necessary to her care.
They might ask exbf if there's any possibility she might be pregnant, but they might not even ask that and just do a routine test. (Later. First comes the really important tests they need to treat her right now.)
They wouldn't know he's the father. It would take some time for a paternity test which they probably wouldn't do anyway.
HOWEVER if you really need him to know this, there's always overhearing stuff in the emergency room. Depending on the size of the hospital they end up in, and how severe his injuries are, he just might be in the emergency room at the same time the staff finds out she's pregnant. This is doubtful as she's really badly injured so she'll be whisked off to CT Scans and spinal xrays and all the other stuff they need to do immediately to determine the extent of her injuries, while he'd be treated for whatever his injuries are and then released into the tender arms of a police person to find out what happened. (Not arrested, just questioned.)
They wouldn't allow him back into the emergency room area after he's been treated unless he needs some observation.
I will note, however, that I know quite a bit about a baby left in the care of a grandmother who left it in the care of an uncle and then s/he ended up in the emergency room with lots of bruises and lots of police standing right outside my wife's cubicle talking all about it while I sat behind the curtain. If I'd bothered to read the board with all the patient stats on it hanging on the wall between wife's cube and the toilet, I probably could have put a name to the battered baby. So overhearing IS possible if you can get your injuries and timing right.
Doubtful, since they'd probably get her into surgery or ICU after the tests, which is where they'd find out she was pregnant. By then no one would be discussing her care in the emergency room within earshot of him.