My understanding is there is a 'recommended sell by' date beyond which the food is considered 'not so fresh' and an 'expiration date' beyond which the food is potentially spoiled and should not be eaten. After the first date the food is 'outdated' and after the second date it's 'expired'. Is my understanding correct?
The word outdated isn't typically used in the context of food freshness.
The adjective outdated suggests something is no longer widely in use or is unfashionable. Wearing poodle skirts is generally considered outdated. Super Nintendo and Windows 95 are outdated. You wouldn't typically say your food is outdated (unless its presentation or ingredient usage has gone out of style).
"Expiration date" is a term used to indicate when either the shop has to stop selling the item ('sell by' date) or the date by which it must be consumed ('use by' date). If the freshness and overall quality of the product is more of a concern than health issues (for example, crackers go stale but are largely safe to consume after their expiration date), one might use the term 'best before' or 'best used by' date.
But, generally speaking, if food is said to have "expired", that generally means it should not be consumed. It is only historically that items (like milk) were labeled somewhat ambiguously with terms like "expiration date" — which, in the case of milk, was the date it needed to be sold by — but laws varied by product. Product labeling of expiration dates is typically a bit more specific now.
As others have noted, "outdated" is not a commonly-used term to describe food.
I think here, as in many cases, you have to be careful not to assume that one writer's usage represents any kind of standard. Writers often find it helpful or necessary to invent very specific definitions of common words for the purpose of one article or book. He may take a word that has a general meaning and give it a more specific meaning. Or he may take a word from some other context and give it a meaning relevant here.
The conscientious writer will make clear that he is doing this. He will say something like, "In this article, I use the word 'chair' to refer specifically to a piece of wooden furniture intended to be sat on by one person at a time, and not to include padded or cushioned furniture or furniture that seats more than one person ..." or something of that sort. Sometimes they are a little more vague, and sometimes they expect you to just magically know they're unusual terminology. But don't assume that specific definitions used in one particular piece of writing are generally applicable or would be understood in this writer's sense by other people without explanation.