Richard is right. That would be better to be expressed in that way.
I would say that spending time on your family means that you are spending time (using your time) to do something for (to benefit) your family, e.g., I am spending my time on my studies or spending time on my chores.
But if you are simply visiting your family then you are spending time with your family.
"with" is the more commonly used preposition in this example.
Spend time on my family is correct
you could also say spend time with my family