They worked other jobs, no? No one paid them specifically to invent calculus or anything of the sort.
Nearly all schools at the time were not subsidized by society and required substantial tuition payments. Most children had to get jobs. School was rare.
Newton's parents, while not extremely wealthy, could afford to send him to expensive private schools, instead of requiring him to get a job at age 8. This was a prerequisite for entering Cambridge.
His early career was subsidized by his upper middle class parents and inherited capital, not by society at large. He became a professor at age 26, and was paid a salary in exchange for work after that.
This is an anachronism, you're projecting modern social organization to an era that worked very differently.