I think it was set in the middle ages. The MC went back to the past and used his future memory to survives. If I'm not mistaken he was trapped in a well with other children and they end up eating and killing each other? But after he survives, he realized that he lacked a goal or the drive to do anything else other than stay alive. He later met a genius he heard about in the future and ended up befriending him. They agreed to exchange their deepest secret, the MC tells him he have memories of a possible future while the genius confessed that he was actually a she. The genius suggested for his goal to surpass her. MC refused saying he is not talented enough but the genius insisted and decided to share her talents with him as well as her technique. Later they agreed to meet after a few years and fight each other then. MC and the genius separated each on their own way to get stronger. The MC went to a mountain that imposed trials on its resident by setting restriction. The harder the restriction, the better the rewards. I think he set his restriction to weight, taste and dreams? He always feels heavy, food tasted disgusting and always gets nightmare. That's all I remember. There's might've been some details that I remembered wrong. And thank you in advance.
Possessing Nothing Not sure if there any of this part though : "trapped in a well with other children and they end up eating and killing each other"
This part is present in X-Epoch of the Dragon where the children to save themselves jump into the well ... MC comes back to this point and it starts and the MC has a GOAL.... The part is from this story but the rest isn't there So i don't really know EDIT: Maybe the other part is from Possessing Nothing which I haven't read but seems likely as at least two people have given confirmation