Translation:On my trip to Spain I tried interesting foods.
It's a tricky one this one, because in most uses food is a non countable noun.
I eat lots of food.
However, there are certain instances when it can be used in the plural form:
Spain has many interesting foods, like paella, ham, chorizo etc.
So in this instance, using 'foods' would be correct.
Yes it is complicated - even more than you suggest. As you say, it gets into the matter of countable vs uncountable nouns, but whether a noun should be considered countable, or not, can be very difficult to assess. I got into a long and very tedious argument on another thread about this subject...
Long story short, I believe 'food' is more correct than 'foods' and certainly more common, but the question is hard to answer and intelligent people disagree. I'm fine with Duolingo accepting 'foods', but it's a bit ridiculous that they reject 'food'. They should ABSOLUTELY accept either.
I'm reporting it, without any belief it will change.
I'm very happy with foods here but not at all unhappy with food. In practice I would expect a modifier: some, a lot of and that would influence my choice further.
If you replace interesting by new then I really prefer the plural form. Always by a narrow margin.
I don't see a basis for assessing correctness. And my customary tool for evaluating usage is not so helpful here as the phrases will occur in different contexts: for example, with some there are no occurrences of the plural in that database, while with of this is what you get.
Google may say foods, but I would never say it. It's a strange thing to say. I'm not writing this because I got the answer wrong. I translated literally and wrote foods, as I guessed that's what Duo would do - but that's not what people say and I think that's the point here. In this example you have given I would say Spanish recipes, meals or dishes but never, ever, EVER "foods". It sounds ridiculous.
Both are correct. In English, when people say "on my trip" it can mean the journey there and what you do when you get there. It obviously include being in Spain.
It's like when you say "I went to the store". No one expects you went to the store and stood outside like a sad puppy. No one ever says, "I went to the store, then entered the store".
In a previous question about a trip to Spain, i wrote "a España" and was marked wrong. I thought perhaps it was because "a" is next to another vowel with España. Now I was marked wrong because I wrote "en España". Duo needs to at least be consistent within a single lesson.