I mean probably before the MCU was even a thing I don't think Marvel even knew how far they would have gone before Disney got them
But was it a mistake no, Marvel probably had a reason to give certain characters off to Sony, Universal and Fox when they first started
At the time Marvel was just releasing movies for certain characters such as Spider-Man, The Punisher, Ghost Rider, Blade and Fantastic Four
Fox was doing well with their X-Men movies but they were hitting bumpy roads with certain projects over the course of their run
When Marvel launched the MCU I think they didn't know how big they were going to be with Phase 1
For Spider-Man I think after The Amazing Spider-Man 2, Sony was getting desperate to either make yet another reboot or allow Kevin and Disney to use him in the MCU
Plus I think at the time Sony made their own universe because many franchise from DC to Star Wars to Godzilla and many others because well Marvel was doing really well at the box office and many companies had hoped they could be successful with their own cinematic universe and we all know how those turned out
The only way I see Sony giving up the rights to Spider-Man could be after Spider-Noir and the Spider-Verse trilogy
Sony could continue the animated Spider-Man films but they can give the rights back to Disney
Marvel can do so much with Spider-Man to make Sony not get upset but I think one day maybe Sony will give up the rights to the character that way they can have full control
Seeing how the Sony's Spider-Man Universe was just a major failure, I doubt Sony will continue with that universe and just their focus on the animated movies because those are doing really well
As for Hulk and Namor, in all honesty I am not sure why Universal still has those rights to those characters. Universal isn't really making much Marvel movies anymore seems like their focus is on Fast & Furious and the Jurassic Park/World franchise
To me I think at this point Universal should have given up the rights to Hulk and Namor a long time ago.
I know that Mark Ruffalo has talked to Universal asking them to make another solo Hulk movie (not sure how that's going)
But yeah Universal just need to give up those rights
Will everyone be under Marvel's roof? Not sure.
Kevin did say that Miles can come into the MCU after Beyond the Spider-Verse so there is a possibility that Sony will just hand the rights to Spider-Man and all of the characters after that movie and Sony just ends their run for their super hero movies