If I say I will be here in 5 minutes (or in 5 days), in this context, does in mean after or between now and 5 minutes after? And, in that context, does within mean the same as in?
Think of five minutes referring to the time of now till now plus five minutes. You will be there in that time period: this would be the literal meaning.
So what it literally means is that you will be there before five minutes (or eight days) has expired. However, idiomatically it means I will be there in approximately five minutes or approximately eight days. Note that for longer periods (like eight days) approximately does not mean ten days. It means now plus eight days, give or take a half a day.
If you use within -- which is not the most common way to say this -- you are indicating the strict meaning of "before five minutes has expired I will be there."
In is used for "expressing the length of time before a future event is expected to take place"; the event could possibly happen before, or later.
For example, if somebody tells you "I'll see you in fifteen minutes," you could meet that person fourteen minutes later, sixteen minutes later, or twenty-five minutes later.