Analysis of the Greek
Below is given the Greek of the majority text for both the Matthew and Luke passages. The UBS/NA text omits the words below that are in
[brackets]. Thus, Luke 11:2 does not contain the phrase in Luke if one follows the minority reading. Note that otherwise, the passages are the same, so I have only translated Matthew here (since it without question contains the reference you refer to). I've added line numbers for reference, and commentary follows on the translation referencing those line numbers.
(1) Πάτερ ἡμῶν ὁ - ἐν τοῖς οὐρανοῖς
Father of us the one in the heaven(s)
(2) ἁγιασθήτω τὸ ὄνομά σου
let it be made holy the name of you
(3) ἐλθέτω ἡ βασιλεία σου
let it come the kingdom of you
(4) γενηθήτω τὸ θέλημά σου
let it happen the will of you
(5) ὡς ἐν οὐρανῷ καὶ ἐπὶ [τῆς] γῆς·
as in heaven also upon the earth
Πάτερ [ἡμῶν ὁ ἐν τοῖς οὐρανοις]
ἁγιασθήτω τὸ ὄνομά σου.
Ἐλθέτω ἡ βασιλεία σου.
[Γενηθήτω τὸ θέλημά σου,
ὡς ἐν οὐρανῳ, καὶ ἐπὶ τῆς γῆς].
First line: note that when translating the adjectival phrase
Πάτερ ἡμῶν ὁ ἐν τοῖς οὐρανοῖς I have added the word "one" to reflect that in the Greek, the adjective is referring back to the "Father" just mentioned. Also the Greek word here for "heaven" is in the plural, but without getting into too many details, let me just note that often the plural is translated as a singular. The word for heaven is a plural form in Hebrew (even if talking about singular), and the Greek often carries that over since the writers were Jews familiar with Hebrew. But I also note this because the later reference to heaven is in fact a singular form.
Second line: This is the first of three requests. All three requests begin with the use of an aorist imperative verb form in Greek, which is the form of a command. But when such a "command" is addressed to one deemed superior (such as God is superior to us), then the idea is that of a request, such as "let" or "may" this be done. So the first request is passive in form, and is for God's name to be made holy. The verb used (ἁγιάζω)1 is specifically the act of making something holy, and so the request implies His name is not yet as holy as it needs to be made so.
Third line: The second request is for God's kingdom to come. The verb (ἔρχομαι)2 means "come," and demands a change from what is not present to what is. So the request can only mean it is not yet come. This matches with the fact that both John the Baptist and Christ only proclaimed the kingdom was "at hand" or "near" (Mt 3:2, 4:17, et. al), and so not yet come.
Fourth line: The third request is for God's will to actually begin to come about. The verb (γίνομαι)3 is the idea of coming into being, existence, or originate. So the idea that something "happens" is contained in it as well. Its emphasis is on a change (though it can at times mean simply "to be" in a place or state, but that is the least common idea of the verb).4
Fifth line: After the third request is your line in question, "as in heaven also upon the earth." So the question, as you have noted, is what all does that "cover" from the preceding requests?
All Three Are Covered
Grammatically, the phrase could either apply to only the third request or all three requests (it would be arbitrary to attempt to make it cover only the second and third).
Conceptually, however, the phrase almost demands application to all three. This is because all three requests are seeking for something to come about that is not yet come about. If it only applied to the third request, then that would imply that neither God's name being holy nor His kingdom existing is currently happening in heaven either. That does not make sense from the rest of Scripture.
So the request is that all three come about upon the earth as they already are in heaven. For those like myself that are essentially "futurist" when it comes to prophecy, the first part of this prayer is that God would bring about the final stage of the kingdom on earth, where God is directly ruling over earth as He is in the heavens, and all are honoring His name (i.e. no recognition of other gods, blasphemy of His name, etc. allowed) and His will is done (i.e. no sin and rebellion allowed).
God's name is praised in heaven (e.g. Isa 6:3; Rev 4:8), but can be defamed in earth (e.g. Lev 20:3, Ps 29:2), but one day will not be (e.g. Isa 45:23; Ezek 39:7; Rev 15:4)— the first request is asking for that coming future state.
God's kingdom is in heaven (e.g. 2 Chr 20:6; Ps 103:19), but not yet fully manifest on earth (e.g. Act 1:6; 1 Cor 6:9-10; 2 Tim 4:1), but one day will be (e.g. Jame 2:5; Rev 11:15, 12:10)— the second request is asking for that coming future state. Note that the passages given about God's kingdom in heaven also mention that He rules over the earth. But He rules over the earth from heaven; the kingdom being requested to "come" is that of His direct rule upon the earth.
God's will is done in heaven (even by Satan, Job 1:6-12), but not yet fully on earth (Eph 6:6; Col 4:12; 1 Pet 4:2), but one day will be (e.g. Rom 14:11; Rev 21:3, 22:5)— the third request is asking for that coming future state. There are many passages where God's will is done on earth (e.g. Gen 41:32; Josh 8:7), but people are still in rebellion to God, and as such, His will is not yet fully upon the earth as it is in heaven.
The overall evidence from Scripture indicates that all three requests are things that do not yet manifest fully on earth, and as such, all three are included in what is to be prayed for.
1 William Arndt, Frederick W. Danker, and Walter Bauer, A Greek-English Lexicon of the New Testament and Other Early Christian Literature (Chicago: University of Chicago Press, 2000), s.v. ἁγιάζω.
2 Ibid., s.v. ἔρχομαι.
3 Ibid., s.v. γίνομαι.
4 As a theological side note, I see this request as arguing for some distinction between what God allows to happen and what He truly desires to happen. The request does not make sense otherwise. That is, God's sovereignty means He has determined things may happen on earth that are against what He wishes to happen on earth. The request is to bring into alignment what does happen with what He wishes to happen, but the request must be made because it has not yet become so.