I rewatched School of Rock the other day and was struck by how perfect Jack Black is in the role (I know it was written for him). It just made me think of other films which whilst not necessarily being perfect are elevated by someone who is cast perfectly and whom without the film would just be mediocre at best.
I think Dick can Dyke in Chitty Chitty Bang Bang is another one. Recast anyone else and it would be fine, but he makes the film.