Something that makes things pretty shitty in this situation is that the guy basically had no chance:
If you read around, a lot of people pointed out no contractual agreement can legally be enforced over giving up rights and responsibilities to the child. It doesn't matter what was signed as far as custody or child support or whatever, give or take.
Now, when they were together, the girl had cancer, and wants to freeze her egg. No problem. But then they are told the eggs should be fertilized first. Now, you have a cancer patient in front of you begging you to help her keep her long dream of having a child.
If your answer is: "Sorry sweetie...but if shit was to hit the fan, no matter what we agree to now or sign, no matter how much you ask me to trust you today, if we don't work out, my life could be ruined because there's nothing we can do to force these eggs to be destroyed once we're no longer together".
Yeah, you'd be crucified on the spot by everyone who ever hears that story. So the guy more or less HAD to go through with it, or pay a very high moral/social cost.
And now that shit DID hit the fan, its basically: "Well, if you didn't want this to happen, you shouldn't have gone on with it!!!".
I personally just went and paid the social cost: When i got into a relationship, i made it very clear kids were not for me, period. Before we got married, I made it very clear yet again. Some people thought i was a horrible person for making these kind of "demands", but she was ok with it. 15 years later, she still is.
Thats not for everyone though.