There are NOT medical conditions that allow an adult to eat 1800-2300 calories a day and weigh 350 pounds. An 8-year-old CAN'T get to be 200 pounds on a diet (balanced or not) of 1200 calories a day.
You just can't create energy or mass out of nothing.
Yes, there are medical issues, in the sense that mental health and pyschology are part of one's medical health and condition. But no one has a physical condition that makes 4000 calories out of 2000.
Losing weight it HARD. Keeping it off can be harder. I know.
But eat less and you weigh less.
Eat more and you weigh more.
On school field trips, I'll look at the lunchs kids bring from home.
Calories in the lunch correlates amazingly well with BMI.
Healthful food (turkey sandwich, carrots, an apple) versus crap (Dorritos, Twinkee, Lunchables pizza, Snickers bar - yes!, exactly that selection) perfectly predicts behavior in just the ways you'd expect - attention, manners, focus, rule-following, academics. The food isn't the only cause. But it sure does track all the other causes (parenting, parenting, parenting).