Looks like spinach is the best way to get your DRV of magnesium/iron if you're going purely from food sources without spending a massive chunk of your calorie limit.

4 cups (720g) of cooked spinach would put you at 100% in both Magnesium and Iron and it'd only cost you ~160 calories. Which really isn't bad, that's a ton of volume though.