Someone with a Ph.D. in a mathematical subject like engineering is probably well suited to teach at least basic mathematics. For example, I definitely think someone with an undergraduate degree in engineering would be qualified to teach a secondary school course in mathematics.
Once you start getting into higher-level or college-level coursework, the situation changes a bit. For a lot of courses, such as undergraduate calculus and differential equations, proofs have little to no role in the course material (which I think is bull****, but that's the reality). So an engineer, who has substantial training in non-proof based mathematics, would probably be quite capable in this position. However, an engineer in a proof-based course I would expect to be much less qualified compared to a similarly educated mathematician. "Pure" engineers just don't have the necessary experience in proofs and rigor that you get after taking upper-level courses in math. However, a "mathematical" engineer, or someone who has for example double majored in math and engineering, I think could still be quite qualified. Similarly, I think a math professor could do a great job teaching engineering if they came from that background. Basically, that's the background I'm trying to create for myself right now.
One remark closely related to this discussion: there's a big problem with undergraduate mathematics education in the USA. People aren't taught to reconcile their enjoyment of both pure and applied mathematics. In my experience, my math courses at UT Austin have done a horrible job of synthesizing mathematics and applications together. Usually, the math classes have erred on the side of overly applications. There's very little proof of what you're being told, and very little exploration of the root ideas. Hence, after a few years, the concepts become quite muddy and you start to question that the ideas even work. You can only use the "chain rule" so long before you wonder, "where the *** did that come from?" Anyways, this could probably be the topic of another post...