Given the 10th amendment, education is up to the states. As a result, the creation of a publicly-funded schools looked different in every area of the country. There are, though, some patterns that speak to your question.
Thomas Jefferson was advocating for the idea of secular, tax-funded schools for all (by which he meant white boys, maybe white girls) in the late 1700's, early 1800's and a primary pushback to his, and others' similar, notion was that the money paid by wealthy men in the form of taxes shouldn't cover the expenses of fathers who couldn't afford to pay for their son's education. (Meanwhile, anti-literacy laws promised corporal punishment if enslaved children were taught to read.) It wasn't until the Civil War that the notion an educated citizenry was a net positive for a country caught on.
One of the key factors that turned the tide was the repeated message that America was weakened by an uneducated population. This era marked the rise of the notion of the "American Dream"; the idea that anyone could become something if they just worked hard enough (but again, this was mostly white boys, sometimes girls.) There was pushback to this notion but it was less about socialism or government control and more about wasting time providing a formal, liberal arts education to a child who was going to be a factory worker or farmhand; the education gained working on a farm was deemed sufficient. This represented a shift in who pushed back - previously, it had been wealthy white men pushing back against their taxes going to other people's children, now it was white men with access to less wealth pushing against taxes going to an education they didn't think sons (any maybe daughter) working in physical labor needed.
By the 1920's or so, the pushback was practically nonexistent in any meaningful way. A whole bunch of factors contributed to a national acceptance of tax-funded education for all children (boys and girls, from all races and ethnicities, occasionally those with disabilities) but it's hard to stress just how significant the impact immigration had on shaping the idea that school was a place that could create an American identity. Public school advocates would speak about children walking in "German, Italian, French, or Jewish" and walking out American. Generally speaking, there was the national consensus that public education was a good thing for every child and for a healthy democracy. There were scisms - Catholic parents wanted a religious-based education and established parchical schools, parents with access to means shifted their support to private schools but paid school taxes that went for other people's children, and several court cases negotiated nuance around ages of attendance for isolationist communities such as the Amish.
While there were pockets who advocated against government-run schools in the early 20th century, those pockets generally fell into the examples above - religious ed, private schools, or homeschooling. The most vocal pushback, though, to government-run schools came down to integration and desegregation. White adults accepted paying taxes for white children but pushed back - hard - against the notion of those taxes providing a high-quality education to Black, Indigenous, Mexican-, Chinese-, or Japanese-American children. This pushback came in a number of forms, ranging from Mississippi's decision to eliminate compulsory education laws in the 1950's, which meant schools could legally turn away Black children, to the creation of a tax-payer funded voucher system in several states that allowed white parents to send their children to segregation academies and avoid the public schools which were required to accept Black children. Pushback around integration in California schools almost led to an international incident. So, in effect, white parents have invested more energy in keeping children of color apart from their children than in concerns about socialism.