Perhaps. But wer're not looking at in-universe. It's all about audience reaction. Have a character say the thing and so on.
And it's bad writing if you sacrifice in-universe credibility for the sake of getting a cheap recognition reaction from the audience. An Easter egg is fine if it makes sense within the story, because it doesn't break the logic of the characters.
Okay, granted, an intrusive continuity reference can pull you out of the story and get in the way of suspension of disbelief. Even I could tell that the Red Death's use of the line seemed like a self-conscious reference to something, though I couldn't place it. But what I'm saying is that there's an additional reason why the line in The Flash doesn't work, because it breaks the character's own internal logic in a way the Red Death's line doesn't.