Robin and Nami definitely had it worse than Law. Law's really wasn't as bad as you're making it seem, though it was bad and he handled it way worse. He had a family and they were killed, Sanji's family constantly abused and tortured him. Of those two what's worse having loving parents for 9 years and them dying(which by the way is how you become Batman lol) or having your family hate your existence and make it miserable for you constantly for 9 years? Law suffered one event(albeit it tragic) and broke but shortly after found Doffy and his group who helped grow him and Corazon who helped heal him, the others dealt with constant horrible situations with no real support. The only ones who wanted Law dead were those afraid of the disease, everyone wanted Robin dead and Sanji's own family(the only ones he knew or who knew him from what we've seen) wanted him dead at least Law had people on his side after his trauma the others had to live and cope with it on their own for longer.Sanji's childhood doesn't even come closer to being half as bad as that of Robin, Law and even Nami for that matter. Law had the worst childhood of all, and if we were to consider their entire journey; then Robin's may come on top as she suffered the longest.
It comes down to what you view as more sad; having happiness and having it taken away or never being allowed to know happiness.