What could make a 24v fan circuit start jumping to over 40v for the first 30 seconds it runs?

Yes, but to make this comment better, use a buck or buck/boost converter, the cheaper of which is only a few bucks on eBay. But also watch out for input voltage limits; if it's running from a 40V supply, you might have to throw a beefy zener or two inline with the buck converter input to drop the voltage a bit to keep the buck converter healthy. Some cheap ones go up to 35V so say, a couple beefy 5V zeners in series will probably get things done.

But in doing so you're probably killing off any kind of temperature based speed control the circuit might have had, but it's a much more straight forward workaround than trying to diagnose and repair some actual circuit failures that could have happened.

/r/AskElectronics Thread Parent Link - i.redd.it