Is there any research on what causes a pseudo-scientific mindset? As of late I've been coming across a lot of people online who are convinced that, without much (or any) formal training and often without any collaboration, they have solved a major unsolved problem in the quantitative sciences. They are incredibly attached to the correctness of their solution. They often talk about their god-like cognitive abilities and act as if the scientific community is dogmatic (One guy said he has a "vulcan-like" mind, which I thought was hilarious). Often their "quantitative" theory doesn't even have any real math in it, and they almost never make any experimental predictions.

As someone who has and probably will continue to tutor kids in math and science, I'd like to know what kinds of events at what stage of development lead people to this insane level of hubris and confirmation bias.

Some requested examples:

This youtuber thinks he's proven the Collatz conjecture and other famous problems.

This youtuber solves a bunch of made up problems in fluid dynamics and has a few uncontrolled experiments on video to demonstrate the effectiveness of his model.

This guy. . .thinks he has a theory of everything. . .he wrote an article basically bashing the physics community for not having come up with his theory. I found this Quora post about him.

Many examples are people my age (undergrad) who have approached me in real life and, once we discover a common interest in quantitative science, they start throwing around technobabble about a "major" problem that they've contrived.

There's also a pretty good example of the pretentiousness exhibited by these people in the stack exchange posts linked in the comments.
I'm alas not aware of systematic studies on cause of the pseudo-scientific mindset... But knowing some people who are inclined to that as well as believing some conspiracy theories... I suspect these two share some common causes. It's a lot easier to find science articles about the latter.
One posci article lists some of the usuals suspects regarding the pseudo-scientific mindset:

distrust of scientists/academics (goes well with those inclined to believe conspiracy theories)

and closely related, the Dunning-Krueger effect


various cognitive biases, including

clustering illusion
selection bias
and once some of those take hold, confirmation bias


money or other personal gains, although this isn't necessarily a true mindset, it just looks the same in may contexts, so can be hard to differentiate by an outside observer (let's not get to fMRI studies about detecting lying)


As you can see the putative causes can be pretty diverse...
It turns out there are some studies (and they generally support the above theorizing), for instance:

pre-existing paranormal beliefs were associated with an increased likelihood of students finding paranormal reports scientific, believable and credible.
[...]
Dagnall et al. (2007) suggested that while belief in the paranormal in undergraduate students is not necessarily associated with weakness in probabilistic reasoning, it is more strongly related to weaknesses associated with their understanding of randomness and misunderstanding of chance factors.

Also mostly as a response to uhoh, an NSF survey:

Of the 1,574 [US] adults that were surveyed, only one-third understood and could accurately describe the scientific process. Many Americans also agreed with a variety of pseudoscientific beliefs such as the existence of UFOs (30 percent), astrology (40 percent), and psychic powers (60 percent).

That was in 2003. I doubt things have gotten better in the age of alt-facts. In fact, researchers studying the campaign of Marine Le Pen (MLP), found...

that alternative facts are highly
persuasive: voters exposed to MLP rhetoric move their policy conclusions and voting
intensions toward MLP. Fact checking does nothing to undo these effects despite improving
factual knowledge of voters. Being exposed only to official facts also backfires
on voting intentions, as it increases political support for MLP, although to a smaller
extent than alternative facts, despite moving posteriors about facts toward the truth.

To me that sound similar to some the findings about how pseudoscience gets adopted by some.