It depends on how "excellent shape" is defined. Appearance? Bicycle speed or endurance? Weightlifting? All-around ability? Lack of disabilities? Lung function, blood chemistry and blood pressure? Or all of the above.
When I was 35 years old, 5'7" and 140#, I was in good shape from competitive swimming. 140# is heavy for that height, but I was well-muscled and my measured bodyfat showed me underweight.
I was doing some weightlifting and was able to bench my body weight (free weights - not bad for a 37-yo girl) and do 100 crunches or so. I was doing OK in the swimming distance events (400m-1500m).
But my lower body wasn't that well-conditioned. I was able to gimp around the neighborhood running 6 miles in an hour, but I was too sore to run for the rest of the week. I was sub-10mph on the bike on flat terrain. A badly-damaged knee curtailed many activities and limited me in others.
Age 56 I had too many more pounds and less muscle but was able to ride my bicycle much longer and faster, and favored a short fast flat time trial type of event. I was able to swim a mile without difficulty if I took it easy but couldn't race it. I couldn't bench 100#. Bodyfat and BMI were unhealthy high. My blood chemistry, blood pressure were excellent.
I've been involved in swimming or cycling for the past 20 years, with varying levels of involvement and corresponding levels of fitness. Weight control has been a lifelong struggle.