Stupidity: We know that the two 'special visitors' have been in our universe longer than a day. Despite being capable, smart, heroic figures, they did diddly-squat until the plot says so, since they haven't tracked down the very public (they recognize them) partners of Spiderman, they don't show up for the battle broadcast by JJJ on giant screens, but more importantly, they do not know who the "Avengers" are, showing they didn't look into Peter's history - the name would have popped up in relation to Stark, the blip and much more. Seems that they didn't even try to look for him.
Stupidity: In the first part of the movie, Peter has to deal with the various 'visitors' and bring them too Strange. But the device Strange will use is just going to send them home no matter where they are (conveniently at the push of a button that even complete ignoramus can push) and there are visitors he does not know about, so everything up to that point has been meaningless. Then it becomes a matter of 'curing' every one of those visitors, but if -as it seems - they have been fetched moments before their deaths, 'curing' them is not going to fix anything. They are still going to die or end up in prison for life due to the horrors they committed.
Suggested correction: Part of the problem we have is that instead of just dealing with the Multiverse, they're also creating parallel or alternate realities in those universes since everyone is pulled from a different point in time in their realities, so any changes besides their death is going to create a new timeline. And I think part of the plan to send them back cured was that from their they could change their course of action or be able to reason with their Spider-Man, which would mean it's better than nothing.
Yes, that's the idea, with all the problems we underlined and the movie ignores entirely. Much like when in Avengers Endgame they don't show you how Cap brings back the stones with the precision required, they elegantly skipped showing us if and how each of them avoids being impaled, drowned, dissolved, or how does it even work for those fetched by the 'same' timeline. We'll see if they deal with these messy timelines at any point in the future.
Suggested correction: With the exception of Doc Ock - who learned Spidey's identity shortly before he died - there's nothing to suggest the other villains were fetched from their realities moments before their deaths, or that they will die upon returning to their realities. Whether or not they end up in prison after returning is irrelevant to the fact that Peter wants to help them. If he doesn't cure them, then they are free to continue causing mayhem regardless of what reality they are occupying.
It's stated in the film that BOTH Otto and Norman died while fighting Spider-Man and that both were pulled from their reality shortly before dying. Max then recounts his fight before being pulled and says "I was about to die." Then Curt asks Max if he died too, but they get interrupted before we find out.
"Shortly" is a relative term. Goblin discovered Spider-Man's identity at Thanksgiving dinner and then died a day or two later. Electro's fate was rather ambiguous, but Jamie Foxx himself implied prior to The Amazing Spider-Man 2's release that he would be appearing in more films, likely including the Sinister Six movie that never came to fruition. We know from The Amazing Spider-Man that Lizard didn't die.
"Shortly before dying" as in pulled during the fight that they died during, not a few days before. It wasn't about being pulled when they found out who Spider-Man was.
Even so, if Green Goblin is pulled from his reality 5 minutes before his death, that would be considered shortly, but it certainly wouldn't be mere moments before he died as the original entry was suggesting. The movie never explicitly states how soon before their deaths they were pulled, therefore we as viewers can reasonably assume that there could have been just enough time for them to alter their course of actions and prevent their deaths.
Also, the reason why Peter wants to 'cure' them is not because they are causing mayhem, but as he explicitly says, because he's not comfortable sending them back when 'some' of them will die - thing is, he can't know that curing their conditions will save them, the whole idea kinda comes out of nowhere. I submitted it as Stupidity because I was sure someone would object it's not a plot hole since it's just stuff the characters 'believe' and there's no proof it's true, however it's funny that 90% of the stuff Peter does in this movie is probably completely pointless.
Saying that he can't know that curing their conditions won't save them is like a doctor saying they won't give a cancer patient chemotherapy because they don't know if it will save them. Their chances of being saved are certainly better if they are cured and cease fighting Spider-Man. If Osborn is returned cured before he attempts to impale Spider-Man with his glider, then that would certainly prevent him from dying in that situation.
I absolutely respect the fact that they want Spidey to be heroic and that the moment he knows that they are going to die he wants to do something about it, that's why I say that it's just funny that there's no indication at all that it would work (by all logic it would not) but it's elegantly glossed over. Let me remind you though that he's not a doctor that wants to cure his sick patient, he's a doctor that wants to cure someone who died 1-2 decades earlier in accidents he doesn't really get into the details of.
There not being an indication that it would work does not make it a stupidity. He can't let the villains remain in his reality, or else it will cause a major multiversal catastrophe. He doesn't want to send them back to their realities and die fighting other Spider-Men, so he does what he thinks is his best option. For this to be a stupidity, there would have to be a rather obvious alternate solution that he overlooked (such as asking Strange to make everyone forget Mysterio's broadcast instead of making everyone forget Peter Parker is Spider-Man).
I don't want to make my own movie in my head, the one we got is more than enjoyable, and I don't want to say that the character is stupid (any movie would be easily solved with afterthought or cynicism, such as "let Strange do his thing"); I merely pointed out that the plot takes you for a ride forcing you to buy premises that are taken as 100% fact and logical (they never ever even imply the fact that what Peter does could be pointless or problematic - in most movies, saving dead people is not a good idea) when they are anything but that. If I know that a crazy person died driving a car into a tree, curing his craziness is one step and not even the most important (would a crazy Norman not survive, if he goes back in time at the right moment and knows what is going to happen? again, the bigger flaw being that if he remembers dying, how can I undo that?) but the movie is surely not going for the "It's most certainly useless, but aww, at least he tried" angle.