I didn't know what food you'd like (eat), so I prepared many (food).
Is the sentence still grammatical if I omit eat and food? Why or why not?
Yes, you can omit both words, although it should be to eat (not eat), and many foods (not many food).
It's OK to omit to eat, because you can omit the infinitive verb if it's fairly obvious what that verb would be. In this case, you can safely assume that food is something you eat. Technically, you can do other things with food, such as put it in a freezer or throw it away. But from the context of the sentence, it's pretty clear that this prepared food is meant to be eaten.
You can also omit foods, because, similarly, you can omit a noun if the reader can reasonably guess what the noun should be from the adjective describing it. It is obvious from the context of the sentence that foods (or dishes) are being prepared. Really, the only noun in the sentence, aside from I and you, is food, so many has to describe foods.