According to Tom Mankiewicz, there was an element of luck involved. He was the guy who, apparently, did the final rewrites for "Superman" (1978) to make something cohesive out of the jumble. He recalled being talked to when they were planning to do "Batman" (1989) and the DC/ WB consensus at the time was to do it as lighthearted and comedic because that had worked for the Superman movies and for the 1960s Batman show. He felt that what worked for Superman did not work for Batman and they should go as dark as they possibly could. Luckily, they chose Tim Burton who convinced them his way would work. I do believe- and this is not an artistic criticism but one based on mass appeal- that they made the same mistake with MoS because of the popularity of the DK movies. They thought it would work for Superman.
We do have quotes from directors saying they had a lot of creative freedom in the MCU. Of course, at the end of the day, MCU or DCEU, the company has the final say. The MCU does not vary as much as the DCEU, however.
While I would not exactly say Spider-Man is his own universe, the MCU proved the sorry mess that results when you try to fit someone else like Iron-Man in as a major player in Spider-Man's story in the early stages. Not sure how Spider-Man is his own setting though anymore than, say, Kazar or a number of characters.
The X-Men really do work better in their own universe. Why is everyone bent out of shape about mutants when the Norse gods come a calling and there's super beings everywhere as threats? Why wasn't it always just fear of super beings?