Shield cannot be used as a reaction to damage
5th edition generally does a good job choosing language that deliberately interacts with other language (especially for the "core" set of rules: Monster Manual, Players Handbook, and Dungeon Masters Guide).
So, let's take another look at the abilities in question:
Fire Form
...[snip] A creature that touches the elemental or hits it with a melee attack while within 5 feet of it takes 5 (1d10) fire damage [snip]...
and
Shield
...[snip] Casting Time: 1 reaction, which you take when you are hit by an attack [snip]...
Shield can only be used against attacks (or Magic Missile), and the damage from Fire Form is not an attack (nor is it Magic Missile). There's no roll or targeting, it just happens.
Worth noting: not all reaction spells are the same.
Some reaction spells would qualify against Fire Form.
For example, Absorb Elements grants you resistance against the element that damages you and lets you deal damage of that type, while Hellish Rebuke deals fire damage against creatures that damage you; though, in both cases against a Fire Elemental, they'd deal fire damage, which isn't super helpful.