I'm not refuting that 'a' process will cool, just that they worded it very badly.
They said, "Gadolinium alloy heats up inside the magnetic field and loses thermal energy to the environment, ..."
It made no sense to me that a material could heat up AND lose thermal energy to the environment. It is true that if it did lose heat to the environment it would exit cooler than when entering the field. How do you 'heat up' a material and have it lose heat? I thought heat up a material means it takes up heat. [Is that 'generate' heat? AHA!]
Again, to me they should have said the phrase simply, Gadolinium alloy has its molecules line up inside the magnetic field and loses thermal energy to the environment, so it exits the field cooler than when it entered. Which coorelates to your statement, "Remove the field and the spins start shift absorbing heat as they do so."
I still say, poorly worded due to the phrase 'heats up' to describe the molecular alignment. To me, heats up means it would exit hotter than when went in AND etc. Perhaps, the concept is that applying a magnetic field causes the material to lose heat, which 'feels' like heating up. arrrggg! Perhaps that is "...heats up inside the magnetic field and..." THUS "..loses thermal energy to the environment,..." or, Gadolinium allow 'generates' heat inside the magnetic field... now THAT I could buy. It's much easier to understand *if* I ignore what they said and simply envision the process. I give up.
A bit embarrassing to be so dense about this when English is my first language.