There's no constitutional concern here. Tenure would provide no protection for a teacher who was using their position to preach. Any talk of creationism or reading from a holy text would have to be part of a lesson that didn't run afoul of the establishment clause.
Neither does tenure necessarily provide protection for a teacher who refused to teach the curriculum to such an extent that they failed their students. Tenure is about protecting teachers from being fired for controversial positions, not protecting them from having to teach the material they agreed to teach.
I can't speak to the particulars of California's tenure or contract in general. Maybe their contract really could protect a physics teacher who taught epicycles instead of heliocentricity despite failing class after failing class.
But I would doubt it.