Is there an ecological scenario where terrestrial insect larvae can show food choices?
The diamondback moth (DBM), Plutella xylostella L. (Lepidoptera: Plutellidae) is one of the most important pests of cruciferous crops in the world.. A strain capable of complete development on sugar pea (Pisum sativum L. var. macrocarpon) has recently appeared. A recent study (Henniges-Janssen, Heckel &amp; Groot (2014), "Preference of Diamondback Moth Larvae for Novel and Original Host Plant after Host Range Expansion"; link) compared the feeding preferences of L4 larvae reared during previous larval instars on cabbage and pea. Pea-reared larvae of this strain preferred peas, while cabbage-reared larvae preferred cabbage. L4 larvae of the original strain preferred cabbage irrespective of their previous diet. I don't think this example has been shown to occur in the field, but the two plants are both fed upon by these caterpillars in the wild.

There is also evidence that larvae of Cydia pomonella (codling moth), a marjo agricultural pest of orchards with a near-global distribution, learn to avoid apple flavoured with saccharine if they have previously encountered saccharine-flavoured noxious plants (Pszczolkowski &amp; Brown, 2005); this probably meets your second criterion for ecological relevance more closely (evidence for learning to avoid odour/flavour cues encountered in a toxic plant, thereby increasing survival) but it's less relevant to a real-world field situation than the first example.

I also found an article on associative learning in insects here that may include some useful examples.