Remember who is saying this and to whom. Jesus Christ, the God of the Old Testament and our Savior is speaking, not to the world in general as some may think, but to all those who have made the covenant with God.
Under the Old Covenant, this includes Israel and Judah, and under the New Covenant, the church. Verse 1 essentially invites us to come and eat freely, that is, without restriction, because all that He offers is good to eat. However, the English translation hides a tone of pity. In Hebrew, it pleads for us to take advantage of what God has made readily available. It bears a pleading tone because suffering and discouraged people seem to be doing all but the right things to help them overcome their difficulties. These people are "spinning their wheels" in their preoccupation with Babylon, a type of the world.
By contrast, the tone of verse 2 is mildly chiding as well as urgently warning. It admonishes against spiritual foods that indeed may make one feel "full" but really do not nourish the spiritual life's genuine needs. Eventually, one feels that something is missing. Our Savior does not argue but asks, "Does all this really satisfy you? Is this the end to which you are called? Is this what life is all about?" He implies that those He has invited will have to choose to change their spiritual diet. Then He urges us to listen carefully. It is almost as if He says, "Listen! Listen!"
He then exhorts us to eat what is good, that is, what He has specifically made for this purpose. In verse 3, His admonishment becomes abundantly clear when He says, "Come to Me [and] hear." What comes from Christ truly nourishes, satisfies, and produces spiritual strength and richness, fortifying the spiritual wall that protects us from falling away.