Spray Foam

I know you can seal around a breaker box with spray foam. Seriously dont make a mess of it.

Should this be cleaned up??

Yes. There should be no foreign material inside the panel.

Raceways that are subject to different temperature air infiltration are required to be sealed. Not sure if spray foam is listed to be in contact with those conductors but some sort of sealant is required by the NEC. The conductors themselves look like type USE which is not permitted within structures.

Robert, I don’t think the photo illustrates a raceway that needs to be sealed. I would refer that issue to an electrician. It’s too weird.

I would think that makes them double insulated .
That may prevent heat dissipation or am I off base ?

Is that an underground service feeder that goes directly into the service panel?

According tot he NEC it requires some type of sealant to keep different temperature air from moving into the panel which could cause condensation. I gave the NEC code section in post #3, 300.7(A). We always use duct seal.