What’s the name of the plot device (used primarily in film) where the baddie has the goodie captured and proceeds to explain various plot points and holes for no logical reason, and clearly only for the benefit of the viewers?
In The Incredibles it was called Monologging. Pretty good name for it, but not sure if that's considered an official name or not. It's what the Bond villains do all the time when they should shut up and get out. Also known unofficially as Gloating.
Yeah, it's a monologue. Viewed through a different lens, it's also narrative intrusion. It's an utterly unnatural form of communication - with the unnaturalness sometimes even being lampshaded as in the above reference with The Incredibles - thus representing the writer's presence in the narrative.
Oh, I was looking for something a little more exciting, but if monologue is it, then okay. But are you both sure? Isn't what Quint does with the Indianapolis story in Jaws a monologue? That's not what I mean. I mean like in the Bond films as @Xoic says, with the completely unnecessary explanation they give to the protagonist, filling in plot holes for the benefit of the viewer.
While I defo feel the difference between the two different scenarios you mention, monologuing is still the word I've always heard for when villians do that little deal where they meticulously explain their highly intricate reasoning and even more bizarrely intricate manner of death they will unleash on the protag. The tropes site also calls it "evil gloating", but, tbh, that's the first time I hear that term for this concept. https://tvtropes.org/pmwiki/pmwiki.php/Main/EvilGloating
"Monologging" is just the term the evil genius in The Incredibles came up with for it. He was pretty much of a goofball, and it was supposed to be funny more than anything else, but the term seems to have stuck. I don't recall ever hearing a more correct term for it, but that doesn't mean there isn't one. And yeah, technically a monologue is where one person speaks for a while, so it's not really the correct term for the evil gloating thing. What did they call it in Austin Powers? I don't think they really had a name for it.
If it's filling the audience in, then it's a form of exposition. I don't think that monologuing fits in general - it implies that the villain talks for a long time without interruption. Also, Hamlet soliloquy is probably the most famous example of monologuing, but it's not a case of a villain explaining his plan. The point of the monologuing in the Incredibles wasn't to find out the villain's plan - it was to keep him occupied. Bond will often ask questions or prick the villain's pride in order to get them to spill the beans, so it's not monologuing, yet it's clearly what you're looking for. I don't think there's a name for it in general. "Oversharing evil plans" is probably the shortest term that sums it up.
I would say that most of these responses are correct but it isn't simply a monologue. It is a villain's monologue. With that clarification it makes it so almost everyone would know what you mean and separates it from any of the other types of monologues. That's what I'd call it at least.