The "secret" is having a good story. A story that is interesting. A story in which it is not obvious what will happen next, yet you can hardly wait to see what will happen next. A story in which everything makes sense (in the end). A story which is believable. A world.
This is why good theater works, even though it is on a small stage in an obviously unbelievable setting. The story must be engaging. Think the "Usual Suspects." Or "The Lives of the Others." Or "No Country for Old Men." Or "Snatch." Or "The Wire." Or "Downton Abbey." Or many other movies and series that did not cost an arm and a leg to make.
You don't need a great director, great actors, high production budgets, or special effects. Yes, these can help. But a great story will make mediocre "everything else" appear great. A boring story will make great "everything else" appear mediocre.
Of course, some stories may intrinsically require a great director, great actors, huge production budgets, or great special effects. For Bladerunner, the feeling of future LA was vital. For the series Rome, a believable Rome 2000 years ago was vital. For the liquid metal robot in Terminator II, the special effect was vital. (But note that Terminator I, which is just as good, was made on a shoestring.) For Lawrence of Arabia, how could you film this, if not in the desert with hundreds of actors and extras? For the Godfather, it had to be Martin Scorcese. And Al Pacino. And...
But, in the end, nothing other than a good story really matters.
So, why does Hollywood--and, worse, network television--produce so much shit? It's because Hollywood is not out to make great movies. It's out to sell movies. If movies like "Independence Day" and reality TV sells, then this is what will be produced.
Of course, I think that Hollywood is also too short-sighted. Making a good-story movie is a larger risk than making "The Matrix 5" or "Spiderman 8." But, a new world with a new story can itself create more spinoffs. Of course, even a good film (like Rocky 1) will then warp into a bad one (like Rocky 14), but I can live with this.
And, of course, convincing the folks providing the cash is easier said than done...