Writing is judged both objectively and subjectively.
Bad grammar, bad spelling, generic labels, clichés, etc can be objectively identified. Long passages of uninterrupted dialog can be objectively identified, long preambles without any action can be identified. Deus ex Machinas can be objectively identified, and explained. There is a reasonable chance a computer program can identify bad writing. A sophisticated and complex program, but using simple "if/then" programming, it doesn't have to be an artificial intelligence or quantum computer.
Much of bad writing is objective, and scientific: Don't do that, most readers don't like it, most agents and publishers don't like it, it just isn't popular.
On the other hand, most good writing is subjective. A computer program cannot tell you if the word choices in a poem combine to elicit an emotional response. They can't tell you if a newly imagined plot hook is compelling. They can't tell you if the actions you invent for your villain produce suspense or horror of sympathetic anger and grief with your MC. Computers cannot tell if a sex scene will be arousing to a reader, or painfully stupid, or laughable, or if it is too long, or if it is completely unrealistic. It takes human readers to judge whether your characters feel like real people to them, or feel like cardboard caricatures.
The same thing for jokes and humor. It takes a human. If you write scenes you hope are truly funny, there is no objective way to tell if they are. People laugh, or they don't, or they roll their eyes.
Breaking immersion is mixed; an anachronistic reference in an ancient setting can objectively break immersion, but some purple prose can also break immersion, as can an inappropriate word choice, and those can be subjective.
We can follow objective rules and logic to determine that something is bad writing.
But not to identify ALL bad writing, just because the grammar and spelling is good, and the dialogue is broken up with action or setting, and it doesn't use clichés, etc, doesn't make it GOOD writing. It can still be bad.
We cannot follow objective rules and logic to determine that something is good writing, and good writing can also overcome some of the technical gotchas that would normally classify something as bad. I've seen typos in great books, for example.
Good writing generates feelings, imagery, a sense of wonder. Those are all subjective judgments, there just is no rule for "this one line will make people want to cry," or "this line will make people laugh out loud."