Unfortunately, this transfer of attitude works in the negative direction too. If the teacher is out of their comfort zone (e.g. parent touching math for the first time in 20 years), then the learner might pick up on the anxiety and start to consider the subject to be unpleasant or hard---if your parent was stressing out about helping you with algebra, then algebra must be a thing of formidable complexity!
As another example, you can think of a teacher bored with the subject (e.g. prof who is teaching this course for the 17th time this semester) who will then transmit "this is stupid shit you have to know, because you're forced to take this course" attitude and students will pick up on this too...
Luckily these days there are really good resources (youtube, free books, interactive demos) so hopefully we'll have more STEM people in the future. We won't make 100% of the population into STEM-experts, but it's not unrealistic to hope that everyone can become at least STEM-literate. I'd like to believe that I contribute to this with my books. This one in particular would be good for adult readers who want to rekindle their relationship with the subject: https://www.amazon.com/dp/099200103X/noBSmath