The New York Times Magazine has a gripping story about fathers who discover they are not biologically related to their children, want to stay connected with them socially, but also think the biological father should foot some of the bill. The core story centers on a man who divorced his wife when he discovered that their daughter was really the child of affair she had with another guy. Since the man had been acting as her father for years and still loved her and wanted to be connected with her, he paid full child support. However, when his ex-wife married the man who was actually the biological father of the child, the court concluded that this new man - legal step-father, actual bio-father - had no financial responsibility for the little girl, though she lived in his house. The man she still called "daddy" was left subsidizing the household of the man who had displaced him.
I don't think there is any good solution to a complex disaster like this. I do think the courts should divide up the money in some proportional way. This division would not need to be based wholly on biological paternity or wholly on social relationship. Money, unlike any other good, has the great advantage of being something you can divide up minutely. Unlike people's affections, and their time, money doesn't care how it is divided.