Would is the past tense of will. Would also feels like it is leaving out some context if you use it the way you have.
lets look at a different sentence to explain.
- The dog will eat the food.
- The dog would eat the food.
Sentence 1 is complete. it is saying the dog, in the future, is going to eat the food.
Sentence 2 seems odd, it sounds like this already happened or maybe it is missing context. it feels like there needs to be a "but" with some explaining
lets alter sentence 2 to make more sense now.
- The dog would have eaten the food, but he was sick and could not.
this feels more complete and give better context, the dog was going to eat the food, but for some reason he could not. this implies we know the dog would eat the food normally, but something got in the way.
with your sentence you have multiple tenses going on so lets break those down to understand why "will" is the word you want.
I left a note on the table two days ago
you left him a note. this has already happened, you left this note two days ago.
so that he will eat the food I prepared for him.
based off your context of "he is going to come back two days from now"
when this person sees the note in two days, he will eat the food. He will see the note that you left, and will eat the food.
the context "I left the note two days ago, and he is going to come back two days from now." is very important here. It is saying this whole event, from the moment you left the note, to the moment he sees the note, is 4 days. two days ago from today you left a note. two days from today, he will see this note and eat the food.
Your actions are past, his actions will be future.