What are the likely causes for overheated electrical wiring in a subpanel? What are the likely expenses associated with a proper repair?
The context is that I’m considering buying a house and see this in the inspector’s report. Trying to figure out how to budget for it. Note: the house is only 20 years old.
“Overheated wiring within the branch/auxiliary panel should be examined by an electrician.”

Thank you for any advice!
The likely reason for overheated electrical wiring in a subpanel is undersized wiring. Wiring, when originally installed, could likely have been adequately sized. Over time, if more loads are added to circuit, particularly those that are running continuously, wires can overheat. It is also possible that an oversized breaker was used for those wires, thereby violating code (and creating a fire risk). Recommended course of action is to upsize wire size, split loads on the circuit across two circuits (original + new circuit), or reducing breaker size (which would result in nuisance tripping each time a wire reaches its ampacity limit).
Good luck!
Omar, thank you for the advice!