Dionna, yes, this is very confusing to a lot of people. Middle grade does NOT mean middle school.
In the situations you describe, a 10-year-old mc, would, in most cases, be appropriate for a younger middle grade story. The 13-year-old would be more appropriate for a more complex, older middle grade story. There is a huge range of complexity, length of manuscript, themes, but just because it's middle grade, doesn't mean the dark stuff doesn't exist. It's just not handled as brutally as it can be in YA. Middle grades explore issues like death and violence (for instance), but in a more careful way, I think. Definitely lighter in tone, perhaps, but the meaning is still present.
To answer your last question, I think you really need to know your character (and yourself), and fully realize the story he/you need to tell. That happens as you write it. I know PLENTY of people who start out thinking they are writing a young adult novel, and end up with a middle grade, and vice versa. Your "appropriate audience" is naturally born out of the truth of the character and that evolves over the course of many revisions.
I would suggest not to worry about your audience yet. Write, and as your character and story forms over time, it will be more apparent where it fits in the marketplace. EVEN THEN, your assessment could be off, and an editor may put it in a completely different category than you expect.