That's a tough one, and I'm not sure there's a direct answer.
I suspect, though, that it has a lot to do with taste, specifically as to what it is you enjoy about other people's writing -- not to make your writing more like theirs, but to have a better eye for one's own.
In the same way that many musicians have insisted to me that missing out on opportunity to practice music as a child or a young adult needn't be an obstacle to becoming a serious musician later in life; it's vastly more important, they say, that you listen to music, and develop good taste -- rather than worry so much about "talent" or lost opportunities.
[Maybe it's]... finding the optimal linear regression of what people want.
But this, I think, is definitely not where it's at.
Though we should of course always be aware of hour others are perceiving what we create, ultimately it's not the job of the artist to survey the crowd for what they already know and "what", and give them more of it (though no doubt many artists get by on exactly this modus operandi, and some go on to achieve a great deal of notional success with it).
Rather -- the artist's job is to create experiences their audiences didn't know they wanted, or perhaps even thought they hated (or just didn't like so much) -- but because you've cast it in a new light, you've forced them to look at it differently. And this, necessarily, involves risk along with the near certainty of failure and rejection.
And because so many artists are afraid to cross that threshold -- sticking always either to what they think people will like (but which isn't their own creation), or to something that is their own creation (based on a few early successes), but never veering from that mold or trying anything really new -- we wouldn't say that makes them "fail" as artists, but they do tend to stop growing, and often never become as great as they once thought they could be.