I don’t think they disagree at all. Since the English Bible is translated, it’s best to see other versions to get a clear picture.
First, if you check other versions, Ecclesiastes 1:4 was talking about the world. 2 Peter 3:10 was referring to the actual earth, like the soil.
Also, the Greek word uses in 2 Peter 3:10 is γῆ Which comes from the primary word “soil”. And the Hebrew for Ecclesiastes 1:4 is ארץ, which can mean soil but also means world, country, etc.
But if you read the whole chapter, it’s clear the writer was referring to the world, not the actual soil. So there’s a clear distinction.
People come, and people go, but still the world never changes.
Ecclesiastes 1:4 CEV
Other versions like Good News Bible, etc. uses world.
I only focused on the words, not the whole context. If we look at what these two chapters were saying, they are also clearly different. Ecclesiastes was saying how history repeats itself and nothing really changes.
So he must be talking about the world like technology, culture, jobs, greediness, joy, etc. So he can’t be talking about the literal earth like the soil. And that’s what 2 Peter 3:10 is talking about. That God will destroy the very earth/soil we stand on.
so yeah, they are not the same.