The ESV is suspect, being awkward.
Especially for Psalms.
There are three main strategies employed by translators.
Furnace or crucible.
Sidestepping the dilemma altogether.
Majority of translations.
Furnace or crucible on earth.
An awkward rendering with no apparent biblical significance.
ESV, RSV, NASB and others.
Furnace or crucible of earth.
A seemingly cogent rendering, but still without anything other than perhaps marginal biblical symbolic significance.
KJ variants and others, mainly earlier.
Some translators have chosen to substitute clay for earth to satisfy the english ear, but this isn't supported, and to the contrary denies the hebrew, where ????? is clearly descriptive of "land" in a political or geographical context, such as "all the earth", or a portion of it, notably "the land of Israel".
Thus, while furnace on earth appears awkward, furnace of earth is demonstrably unsupportable.
There are two terms used elsewhere in relation to purifying metal :
The crucible (????????) for silver and the furnace (???????) for gold,
but the Lord tests the heart.
Proverbs 17:3 NIV
The crucible (????????) for silver and the furnace (???????) for gold,
but people are tested by their praise.
Proverbs 27:21 NIV
However, not apparent in the Proverbs, while silver is smelted, and gold is refined, only silver is both smelted and refined - gold typically found naturally, certainly in the ancient world.
This is more apparent elsewhere ;
He will sit as a refiner (????????) and purifier of silver; he will purify the Levites and refine (?????????) them like gold and silver.
Malachi 3:3 NIV
While we see the term associated with smelting (of silver) in the Psalm, where we would expect the term associated with refining, instead we see ??????????, the only occurrence of this unrelated term.
Thus there's no immediate context as to whether the "land" or "earth" is necessarily connected to and descriptive of that unique term, or whether it should be understood in relation to the rest of the passage.
Coverdale (1535) takes an ingenious and elegant approach in associating ???????? (earth or ground) with the wider passage, in particular the silver, and employing the smelting term found in the Psalm, along with the Psalm's unique "refining" term, to illustrate the smelting and refining, of that silver :
The wordes of the LORDE are pure wordes: eue as ye syluer, which from earth is tried and purified vij. tymes in the fyre.
Perhaps due to similar reasoning, the NIV has elected to take the opposite approach to Coverdale, with a twist :
And the words of the Lord are flawless,
like silver purified in a crucible,
like gold1 refined seven times.
Psalm 12:6 NIV
1Probable reading of the original Hebrew text; Masoretic Text earth
The NIV also using the smelting term found in the Psalm in association with the silver, but employing the Psalm's unique refining term in place of that normally used for the refining of gold (and sometimes silver), and in what appears to be a bold move, replacing the "earth" or "ground" with "gold".
Without access to their deliberations, there's no way to tell how supported this is.