Why would cooked spinach contain more iron than raw?
Iron is simply an element, so it cannot be destroyed by cooking (or generally temperature changes), as vitamins and other organic structures potentially can.

Cooked spinach inevitably has a much lower water content, thus the relative density of all other components must increase. So gram for gram, it makes sense that cooked spinach should have a higher concentration of iron (and possibly some other things) than raw. However, the actual process of cooking does nothing to change the amount of iron.