What does it mean to "spend pains upon someone"?
Solution 1:
It's more common today to speak of spending time on something - using your time for a particular purpose. Pains here means trouble - the father used up a great deal of effort trying to benefit his son, even though he didn't have fun with him.