It does matter if consent can't be given because no free will exists to give it vs unable to get consent due to inability to communicate (like knocking on a door and no one answers so you assume you can repaint the house).
It's possible to wrong someone (morally/ethically) without them and/or you having free will. Therefore, whether there is free will (or, more specifically, the ability to consent) involved doesn't matter. What matters is whether consent was given, not whether it could be given, in order to negate a potential wrong (e.g. punching someone is wrong (no consent), but punching someone is a boxing match is fine (consent)).
With the knocking on the door, we already know there will be no answer (parallel: before birth) -- everyone agrees with that, so there's no point on knocking on the door. We also know that if you decide to "repaint the house", someone will eventually be there (parallel: birth), so we have to be careful with how we "repaint the house". What I'm arguing is that when you "repaint the house", there is a wide range of severe consequences that can result, all of which you can't predict. You don't get to pick the color or the effect it has. Yellow might cause the local biker gang to come and smash up the house (parallel: cancer at the age of 4). Black might allow future renovators to care about the house more because it looks nice (parallel: a long and prosperous life with few struggles). Green might invoke squatters to sneak in and stay in the lesser used parts (parallel: work colleagues ruin multiple promotion opportunities at multiple companies, of which makes you quit and fail to find another great job ever again).
Without the consent, repainting houses is a massive gamble that can lead to some pretty horrendous outcomes. With the consent, repainting houses becomes morally/ethically acceptable.
Consent is morally relevant on the principle of liberty. Liberty is morally relevant because of the universal value of self-determination in volitional intelligence.
No intelligence, no liberty, no consent. For instance it doesn't matter if a tree can't consent to being climbed. There is no discerning will to contradict.
Imagine the tree gains sentience during your climb (and also that you do the climb blindfolded -- much like we can't see who will be birthed before they are). Some big trees won't feel anything and will be fine, and perhaps they might even enjoy the climb as back-scratching or tickling. Some smaller trees may warp a bit under your weight, causing them a fair amount of suffering. Other smaller trees might snap in half and die horribly.
You don't know how much pain/suffering/discomfit you are going to cause the tree beforehand (because you are blindfolded). You don't know whether your climb is too heavy for the tree. You just do it blind with dire consequences at stake.
We can also take an extreme example of someone who is unconscious after a serious motorcycle accident and has no legal guardian/spokesperson to speak for his/her best interests. This person is unable to consent, both literally and legally. This person will simply die if nothing is done. If we apply your logic of "can't consent" and "no discerning will to contradict", we could justify bashing this person to death, or putting him/her atop a large waterslide just to see how he/she would ragdoll down? Does that seem reasonable to you?
So you are operating under an incorrect theory that "consent" is fundamentally some kind of bandaid to make potential harm due to an interaction acceptable. It acts that way under the right circumstances but that is not why it matters or exists.
Yes, it acts that way under the right circumstances.
I think if you laid the risks of life out to people before they were born, and they said,' yes, this is all fine', then giving birth to them would be morally a-okay.