The issue in Scripture has more to do with the gifts of the Spirit, rather than legalism.
Nowhere after Pentecost does Scripture record a woman being given the spiritual gift of Pastor-Teacher, however, every believer receives a spiritual gift by God upon regeneration of their spirit.
Many do not experience or even know what those gifts might be at the time of their award, but it is a spiritual gift as opposed to a soulish or fleshly gift.
There is probably nothing wrong with a woman teaching Biblical history or grammar in a Sunday School class for children, but that is really an issue for the pastor-teacher and the administration of a particular flock/congregation and that is a legitimate authority when gifted by the Holy Spirit.
Sorry, I just feel that God uses all his servants, male or female. Let's just agree to disagree.