So I want to unpack your question a little more, if that's okay, because I was at this point too last year and having similar questions. I think there are different components to getting acceptance. The first is craft,in a sentence by sentence narrative; the second is the shape of the narrative; the third is subjectivity of those reading it.
What an agent or editor prefers is out of your control, mostly. From subbing a lot of shorts this year--the same piece that had one editor repulsed had another excited. Similarly, my CP (who has just got an agent) found that the same MS which excited one agent, sparked rejections or doubt from others. This is pretty universal and not a lot you can do about this--you sometimes need the right person at the right time.
Craft and narrative shape are things you *can* control, though, and I'm going to take a leap and assume this is part of what you're asking about, ie asking "when is the writing good enough."
Sentence-level craft is not insurmountably difficult to learn. A few months with critique groups and betas can have you polishing that fairly quickly, imo. Actually, I don't think a high level is necessarily the most important thing, but I do think writers tend to focus on it. Well, we would, wouldn't we.
But shape of a narrative is a different beast. You can have a story which is beautifully written sentence by sentence, perfect grammar, the works, and still have it be insufficient as a story. I think that is much more difficult to nail. The MS I'd finished last year was fine for sentence-by-sentence craft, but the shape of the narrative wasn't working (still isn't, I've put it aside). I don't mean structure, before all the plotters jump on me
; in this case it's very structured, although structure can also be a problem.
In general it's more nebulous than that. Like a sketch that's missing some shading (terrible metaphor, but you know.) Sometimes you read a piece in SYW or elsewhere and although it technically ticks every box it maybe misses a little something in every component (characterisation, emotion, tension, any and all); the overall story therefore falls a little flat. Anyway, I felt like this was a stage I was getting stuck at, with other writers not able to advise me much beyond "it reads fine" or "it doesn't" and therefore,
it's good enough to sell was/is this nebulous standard I'm not sure how to measure against.
The point of all that long ramble--I still don't know. I'm not sure you can
ever know, except to put it out there and see what response you get. Sometimes, stories I think will be a flop sell fast. Sometimes, stories I like get panned. Same with longer mss. I write a chapter--is it working? Hell if I know. The sentences are fine and maybe some of the writing is pretty, but that's not always enough. I don't know if it's enough until I put it through its paces with other readers and even then, I still can't really tell. You have a kind of blindness to your own work I think.
Or maybe that's just me and other writers can gauge their own work with ease. But I think that's more rare than not, because if we could tell working from not so easily, we'd never need feedback. Every community will be full of good writers who are convinced they suck, and terrible writers who believe they're amazing; the rest of us exist in a semi-permanent state of optimistic paranoia, where we hope we're good and don't know it whilst being simultaneously terrified that we're awful without knowing it.