Unless specifically prohibited by law, schools can teach specific viewpoints. An example of "specifically prohibited" is RCW 42.17A.555 in Washington,
No elective official nor any employee of his or her office nor any
person appointed to or employed by any public office or agency may use
or authorize the use of any of the facilities of a public office or
agency, directly or indirectly, for the purpose of assisting a
campaign for election of any person to any office or for the promotion
of or opposition to any ballot proposition. Facilities of a public
office or agency include, but are not limited to, use of stationery,
postage, machines, and equipment, use of employees of the office or
agency during working hours, vehicles, office space, publications of
the office or agency, and clientele lists of persons served by the
office or agency.
Your English teacher cannot use the classroom to campaign for a particular candidate or ballot proposition. There is an analogous law in California, and many (all?) states. A more detailed analysis of the Washington is provided here, including a long list of basic principles governing allowed vs. prohibited conduct, but it can be reduced to the dichotomy of "particular candidate / proposition" vs. "viewpoint". Viewpoints that are part of the curriculum can and are be mandated by statute or district policy. Employees may have some latitude to express their personal viewpoint, to the extent that they are consistent with the requirements of the curriculum.
For California, one can look for curricular requirements here. A non-technical overview of the 9-12 science curriculum aimed to inform parents is here, then you can find more technical details here. This document is part of that collection: it's the 4 course high school model (286 pages). You could then compare what is delivered in class to what the Board of Education says is to be delivered.
Here is the Grade 3-5 science curriculum, and here is grade 3 history and social science. There does not seem to be a requirement to teach a viewpoint nor a prohibition against doing so, but there is actually a requirement that you not be graded based on climate change / greenhouse effect subject matter.
So, probably it is allowed. In context, it could be viewed as campaigning against a political party thus illegal electioneering. I can't find any case law in California that addresses the legality of across-the-board campaigning against a political party using public resources, but here is a California legal guidance on legal and illegal campaign activities.