I bet there's a word for that - using the more general term for something as a proper noun when the meaning is obvious from context. Like calling the largest nearby city just "The City". I figure it's the same general idea behind calling it "The Moon".
Metonym?
Also, synecdoche ("a figure of speech in which a part is made to represent the whole or vice versa")
'Sol' and 'Luna' are used as their names in common speech, every single day, in all Spanish speaking countries.
And this is a conversation about English common names and literature.