How "edited" should a paper be before submission
Strive for perfection, but if you fail to achieve it, then it won't be the end of the world. But you write a paper for people to read it, so you should make every effort to make it as good as you can, including grammar and such. Try to stamp out typos. Use an editor that knows about spelling, for example. Or at least, paste your content into such an editor so that you can see where there are errors.
The more readable your paper, in the initial submission, the less the reviewers will need to &quot;fight&quot; with it, getting more and more frustrated if they think you are sloppy. If you aren't a native speaker/writer of the language of the paper, try to get a native speaker to review it.
In fact, it is a good idea to have someone you trust review your paper before you submit it, perhaps a paper copy, simply marking errors for you to correct. It is very difficult to proof read your own work, since your mind will see what you wanted to write and not what you actually wrote.
Reviewers aren't likely to reject your work for such things, but you will get a more useful review, and quicker, if they can focus on what you say and not be distracted with things that you should have fixed.