Could it be said that Adam and the rest of mankind were predestined to sin and to be expelled from Paradise and sent to the earth? In fact, this fiction is as naive as the first one. Adam had complete free will, and he bore the consequences of his deed. He disobeyed by eating of the forbidden tree, so Allah dismissed him from Paradise. His disobedience does not negate his freedom. On the contrary, it is a consequence of it.
The truth of the matter is that Allah knew what was going to happen, as He always knows the outcome of events before they take place. However, Allah does not force things to happen. He grants free will to His human creatures. On that He bases His supreme wisdom in populating the earth, establishing the vicegerents, and so on.
Adam understood his third lesson. He knew now in a practical way that Iblis was his enemy, the cause of his losing the blessing of living in Paradise, and the cause of his distress. Adam also understood that Allah punishes disobedience and that the way to Paradise has to be through submission to the will of Allah. And he learned from Almighty Allah to ask for forgiveness.
Allah accepted Adam's repentance and forgave him. He then sent him to the earth as His first messenger.