A verbal agreement is not worth the paper it is written on.
The thinking would be that both had an interest in creating a life which costs money to bring up.
This is a liability issue for the courts and not a simple contract agreement.
I would think they consider any contract between parents to be secondary to the needs of a child.
Plus if the courts rule in favor of the contract over the child, then they are ruling that the government has the first responsibility to pick up the expenses instead of first both biological parents.
I can see why a contract that leaves the public with the bill will not fly in courts.