Layman here. Wouldn't that metaphor be valid if the "problem" being solved is actually a driving factor of selection?
E.g., birds capable of flight have numerous physiological changes which could be seen as "optimizations" for flight. Yet, formally, "flight" doesn't appear anywere in the equation - it's just genetic markup that has been driven in a certain way by recombination and selection.
However, for many birds, the ability to fly - and to fly better than their predators or competitors in some aspect - actually highly influences the ability to survive: Therefore genetic markup that results in physiology more capable of flight results in a higher likelihood than markup that worsens the ability to fly.
(Of course other factors, such as environment, influence selection. Additionally, certain traits can increase likelihood of survival in a different way - even if they are poor solutions to the original "problem" - and lead to adaptation. So the metaphor is obviously not perfect)