Does the Pope have the moral authority to baptize martians?
[In case of necessity], [a]nyone [, even a non-baptized person, with the required intention], can baptize [CIC, can. 861.2.], provided he use water and the correct [Trinitarian baptismal] form[ula]: "I baptize you in the name of the Father, and of the Son, and of the Holy Spirit. Amen." [cf. CCC V. WHO CAN BAPTIZE?, 1256]
In the case of extraterrestrials, there is doubt whether they are human, so a conditional baptism would be required: "If you are human, I baptize you in the name of the Father, and of the Son, and of the Holy Spirit. Amen."
From the Roman Ritual:
In the link you cite, the Pope does not say he would baptize aliens. He is using the idea of Martians wanting to be baptized as an analogy to the strangeness Peter experienced when Gentiles wanted to be baptized in Acts 10. It's just a metaphor.
Introduction: If the pope had the authority, would he have posed the question?
Answering from Church Tradition.
What guides the Church in every age is to refer back, through the Church Fathers, to the Apostolic Age [Divine public revelation was closed]. cf. St. Vincent of Lerins: The "Vincentian Canon", AD 434:
What comes close to the question asked is the Controversy at Jerusalem [Ac 15:5-7] that led to the Council of Jerusalem [cf. entire Ac 15]. This council is unique among the ancient pre-ecumenical councils in that it is considered by Catholics and Orthodox to be a prototype and forerunner of the later Ecumenical Councils and a key part of Christian ethics.
Thus it appears that the Pope would not have the authority on his own, should such a matter arise. It appears that the matter would have to be settled via a valid Ecumenical Council [vs. say a Synod of Bishops].
Answering from Common Sense.
Moral Authority: A person, group, or organization that has moral authority is trusted to do what is right. cf. Moral - Definition for English-Language Learners from Merriam-Webster's Learner's Dictionary
[A] Nation: a large area of land that is controlled by its own government cf. Nation - Definition for English-Language Learners from Merriam-Webster's Learner's Dictionary
This is Jesus' mandate to baptize:
To answer whether the Pope has moral authority to baptize martians, one would need to examine whether the Pope is right to determine that Martians can be baptized, i.e. the Martians were in need of Baptism in the first place, and that they were covered in Jesus' mandate.
Nations have always been understood as those belonging to this world (Jesus' on earth). If the Pope were to determine that it was right to baptize Martians, assuming that he had established that Martians were in need of baptism [not sure how he would go about establishing that], it would appear that his determination would be in excess of Jesus' mandate as Martians do not belong to the nations.
Finally, if the pope had the authority, he wouldn't have posed the question.
Pope Francis’ Martians are “people living in such unions [same sex] request[ing] a child’s baptism” cf. Instrumentum Laboris 2014, No. 120. It appears that the question was posed for the purpose of setting the stage for the upcoming synod.
This is what the Pope said: "Just as if, for example, tomorrow an expedition of Martians came … green, with long noses and big ears, just like children draw them … and one were to say, ‘I want to be baptized!’. What would happen?" | We are all ostiaries (12 May 2014) | Morning Meditation in the Chapel of the Domus Santae Marthae | Pope Francis.