Insulate rigid rectangular duct
Your plan to use polyiso foam board will work, but you must be absolutely sure to perfectly air-seal the insulation so that humid summer air cannot reach the cold metal duct surface. The only advantage of the spray foam approach is that it's easier to get this air seal. But you can get it with foam board using canned foam, tape, and caulk, it's just harder.