Is style defined as effectively "Lacking substance"? No?
Is substance defined as effectively "Lacking style"? No?
Then no, they're not mutually exclusive, and yes, a work can have both.
Style over substance is bought up usually in relation to works where style is prioritised completely, and substance is ignored. If a work is very flashy, but doesn't really have much to it - style over substance. Ideally, a work would begin from a great idea it wanted to communicate, build up a lot of substance around that in how to communicate it, and then throw in style to make it more interesting to watch. Take the latest two Captain America movies; Civil War and Winter Soldier. Both have started from very current social issues; whether its the government that should be in control of those protecting us, and whether we should trade freedom for security respectively. The movies explore these ideas, and let out their maker's opinions on them, but do so with a ton of style that makes them fun and interesting to watch.
Style over substance is when you start planning from the style stage, and the plot exists purely to justify that style, rather than to explore any ideas or be compelling in its own right. Ideally, style is a servant to substance. Its a tool substance uses to make itself more interesting and more engaging. Style over substance is where the reverse happens, where style uses a facade of substance to try and create a reason for itself to exist.
That said, movies that are all style and little substance can still be enjoyable, however they will never be as great as movies that utilise both style and substance effectively - and the same goes the other way around. Movies where its all exposition about some issue that the producer is trying to convince you of their opinion on aren't all that great. Both working in tandem makes a great movie. Either working alone generally leads to a mediocre experience.
As someone else pointed out, its like brains vs brawn. You can have your 'puny' nerd who's really smart, but an utter weakling and just does not do well with physical activities. You can also have your sports jock who's really great at athletics but just does not do well academically at all. There's also the third kind of person who is great at sports and physical activities, but also intelligent and well learned. The two aren't exclusive, and ideally a well balanced person would have both enriching their lives. Same goes for style over substance for any media. Both can exist exclusively, but its just better when they exist in balance to enrich a work.