The Gemara in Shabbos (117b) teaches that eating three meals on Shabbos is an obligation. In Shabbos (118a), the Gemara further states that as a reward, one who fulfills this mitzvah will be saved from three significant calamities: 1) the suffering preceding the arrival of Mashiach, 2) the judgment of Gehenom, and 3) the war of Gog and Magog.
The Shulchan Aruch (291:1) rules that even if a person is full during Shalosh Seudos (the third Shabbos meal), they are still obligated to eat at least a k'beitzah (the volume of an egg) of bread. The Mishnah Berurah (291:2) adds that if eating this amount is not feasible, one should eat a smaller amount of a k'zayis (the volume of an olive).
If even this proves challenging, there are unique leniencies for Shalosh Seudos that do not apply to the other two Shabbos meals. The Shulchan Aruch (291:5) brings several opinions: some hold that eating food made from the five grains suffices, others allow for meat or fish, and some even permit eating fruit. However, the Shulchan Aruch concludes that eating bread is preferred unless one is genuinely too full to do so.
It's important to note that the Shulchan Aruch (291:1) brings the opinion of the Rambam (30:9), who explains that if all eating causes pain, one is exempt because the meals of Shabbos are meant for oneg (enjoyment). To avoid this situation, the Tur advises planning by not overeating during earlier meals, enabling one to partake properly in Shalosh Seudos.
Some mistakenly think they may study Torah instead of eating Shalosh Seudos. While this view is mentioned in the Zohar and cited by the Magen Avraham (444:2), the Mateh Efraim (597:4), Aruch HaShulchan (444:6), and Kaf HaChaim (444:18), all say it's not a valid alternative, and one must eat.
In short:
There is an obligation to eat Shalosh Seudos even when one is full. A wise person plans to ensure they can fulfill this mitzvah. Ideally, one should eat at least a k'beitzah of bread, but if this is not possible, a k'zayis suffices. If that's also too difficult, other foods may be eaten. If eating anything will cause pain, one is exempt. The Achronim say that learning Torah cannot replace this obligation.