I find Tasha's speech kind of annoying and heavy-handed but not the worst variety of anti-drug messaging, certainly. The kind of PSA we got shown in school when I was a kid were so over-the-top and clearly exaggerated that I feel like if anything they had the opposite of the intended effect -- I as a kid at least was skeptical of everything I had to say because I could tell they weren't being straight with us.
Good points, and it is a bit heavy-handed.
Like or dislike the episode and for whatever reasons and IMHO there's a mixed bag of a story containing the dialogue snippet with much more potential than what it does say, there is one redeeming scene from an episode of TOS that also says "drugs are bad":
KIRK: There's only one kind of woman--
MUDD: Or man, for that matter.
KIRK: You either believe in yourself, or you don't
(Suggesting that people who don't, or want external validating, are more inclined to take drugs? It's from "Mudd's Women", revolving around a drug that supposedly makes women more beautiful and has the character Eve, in as much as the mid-60s could actually say before the show's censors said "too far" (note the pilots, including "The Omega Glory"), discussing partners of depth, vs sex objects. )
Here's more of the scene:
EVE: You don't want wives, you want this! (handful of pills is shown) This is what you want, Mister Childress. I hope you remember it and dream about it, because you can't have it! It's not real! (takes the pills) Is this the kind of wife you want, Ben? Not someone to help you, not a wife to cook and sew and cry and need, but this kind. Selfish, vain, useless. Is this what you really want? All right, then. Here it is!!
KIRK: Quite a woman, eh, Childress?
CHILDRESS: A fake, pumped up by a drug.
KIRK: By herself. She took no drug.
EVE: I swallowed it--
KIRK: Coloured gelatin.
MUDD: Yes, they took away my drug and substituted that.
EVE: But that can't be!
KIRK: There's only one kind of woman.
MUDD: Or man, for that matter.
KIRK: You either believe in yourself, or you don't.
The story is ratcheting up there in the heavyhanded aspect as well. But not as much, nor in the same way. Why women couldn't be miners was never explored, but considering the network censors of the time, the show could not go so far and suggest that. By 1969 and the show a few episodes away from its finale, despite some censor limitations remaining, we still got to see Vanna in "The Cloud Minders" as a miner.