From your description, it appears that the brown spots are PIH (post-inflammatory hyperpigmentation), as Dr Theng rightfully mentioned.
Certain individuals may have higher risk of PIH after skin inflammation and may take a longer time to recover.
After your eczema settles, you might want to consider the following treatments for PIH:
1. Creams (tretinoin creams, vitamin C creams)
2. Chemical peels
3. Laser treatments (Q-switched Nd:YAG lasers, Picosecond lasers)
Also, do remember to apply sunblock to prevent worsening of the pigmentation.
Hope that this helps!