【で】
チーターは、地球上で、もっとも足の速い陸上動物だ。
で in this sentence doesn’t indicate a location where some action takes place. Its function is to delimit the scope of comparison. It is used in a sentence that expresses the comparative (“more”, “better”, etc.) or superlative (“most”, “best”, etc.) degree, such as this one, which contains the superlative adverb もっとも.
Your other example, with 一番, also fits in this category.
私は地球上で一番幸せな男だ。
In these particular examples, what comes before で just happens to be a place but it doesn’t have to be, as you can see in the following, rephrased sentence.
地球上の陸上動物(の中)で、チーターがもっとも足が速い。
で here limits the scope of comparison to (all) land animals on Earth.
The scope can be much narrower, as in the following sentence with a comparative.
ライオンとチーターでは、チーターの方が足が速い。
Here the comparison is limited to between the lion and the cheetah.
In the following sentence, で does indicate a location where some action (生きる) takes place (except it doesn’t, because the sentence is negative).
空気が無ければ、我々は地球上で生きられないだろう。
【に】
に doesn’t work in your sentence because it should be used to indicate a location where something exists or is present.
Note that the following sentences, with the verb ある, both talk about the existence of something.
地球上にはたくさんの文化がある。
地球上には7つの大陸がある。
And the following talks about the absence of something.
もし太陽がなければ、地球上に生命はないだろう。
Your first sentence, on the other hand, doesn’t talk about the existence or presence of a cheetah or cheetahs in any place. It states that cheetahs, which are already known to exist on Earth, are the fastest within a particular scope. に doesn’t go well with such a statement.