Early on in my career I had a name for this. I called it "gamle helter" in Norwegian which roughly translates to "old heroes". An "old hero" is someone who used to be competent in a field, has stopped being competent, doesn't recognize this themselves and is now a nuisance to anyone who actually knows what they are doing, but can't pull rank. One way to become an old hero is typically to end up in management and not practice whatever discipline you think you understand.
To be fair, I highly doubt that Musk was ever a competent software engineer, much less a good engineering manager. He is a PR person. He sells an image that he is a technology person.
Since you linked Wikipedia, I'll quote it.
> Nevertheless, low performers' self-assessment is lower than that of high performers.
> Among laypeople, the Dunning–Kruger effect is often misunderstood as the claim that people with low intelligence are more confident in their knowledge and skills than people with high intelligence.