The Skypiea Arc is often thought of as a microcosm of the story of One Piece, and the main conflict in that arc was due to Vearth: a piece of earth/soil that arrived at Sky Island that allowed citizens of Skypiea to cultivate vegetation on it. Enel, in his search for Fairy Vearth, the Endless Earth, flew to the Moon, but when he arrived there, Fairy Vearth was nowhere to be found. That's because Fairy Vearth is the name of the land mass that once existed 900 years ago, before it was swallowed by the 200-meter flood, and the Red Line that encircles it.
It is "endless" as it goes around the world; like Ouroboros.
The literal translation of the Red Line is "Continent of Red Earth", and at the top of that lies Pangaea Castle, named after the real world supercontinent that once existed, and that will once again exist.
The Ancient Kingdom
According to Whitebeard, there used to exist a "Kingdom of Gods" (神の国, Kami no Kuni?) at the top of the Red Line, inhabited by a tribe of "gods" – the Lunarians. Eventually, the Lunarians would be driven to near extinction and Mary Geoise would be built on their homeland.
These events bear striking similarity to the events that transpired between the Twenty Kingdoms, now known as the World Government, and the Ancient Kingdom. It is said that the Twenty Kings united against the Ancient Kingdom, and after defeating it, they erased any mention of it from history, made sure to exterminate any member of their tribe, and, I believe, they took their home as their own. Everything so far points to the inhabitants of the Great Kingdom being Lunarians.
This might not be common knowledge, due to the anime never adapting Enel's cover story, but the Skypieans, Birkans, and Shandians all originate from the Moon, and have arrived at the Earth because they exhausted the Moon's resources.
If the inhabitants of Skypiea (Sky Island) are called "Skypieans", the inhabitants of Birka (Moon) are called "Birkans", and the inhabitants of Shandia (Blue Sea) are called "Shandians", does that mean the place Lunarians once inhabited is called "Lunaria" (Red Line)? Is the name of the Ancient Kingdom actually Lunaria?
Or, perhaps, Lunaria was only the name of a city in the Kingdom known as "Eden".
The Garden of Eden
Despite Lunarians containing the Latin word for "Moon" in their name, and having similarities to the other moon people, there is actually nothing in the story that suggests they actually originate from it. Instead, their name derives from "lunaria", a plant whose name means "moon-like".
The tattoo on King's face might be a reference to the plant itself.
Recently, One Piece has been drawing increasingly more parallels with the events from the Bible; the Great Flood, Noah's Ark, and the Lunarians/Seraphims being based on the Seraph Angels immediately come to mind, but there are also some older examples, such as the Sunlight Tree Eve and Treasure Tree Adam being named after the first two humans. According to the Bible, Adam and Eve defied God and ate the Forbidden Fruit (of knowledge of good and evil), a crime for which they were banished from the Garden of Eden. I believe the citizens of the Ancient Kingdom, be the Lunarians or some other race, came from outer space, and were primarily known for their cultivation skills.
Besides the aforementioned Adam and Eve trees, we also have the Whale Tree on Zou, the Tree of Knowledge, the Devil Fruits, the Giant Jack, etc, and the imagery of otherworldly beings that would "plant life" across the Universe is surprisingly common in fiction. Marvel Comics have a character by the name of "Gardener", a virtually immortal being who devoted his life to the creation of natural beauty by sowing the seeds of plants, flowers, and trees upon barren or devastated worlds. But, more relevant to Manga, Japan has a famous story that dates way back from the 9th or 10th century, called "The Tale of the Bamboo Cutter", also known as "The Tale of Princess Kaguya", in which the titular Princess Kaguya is found as a baby in a bamboo plant. I'm sure you are familiar with this myth thanks to Naruto.
The Great Kingdom had a garden in which they grew fruit. Eventually, they would create what is now known as Devil Fruits, and the one who was in charge of gardening them was no other than Joyboy.
Farm Boy and the Straw Hat
Chapter 1114 revealed Joyboy to be the very first person to be called a Pirate, confirming decade-old theories in the process, but I think what is more intriguing here is what or who Joyboy was before he sailed under a Jolly Roger. Time and time again, we are met with characters forced into the life of piracy for different reasons, some more noble than others. Kaido was a child soldier betrayed by his country and sold into servitude to the Marines, Whitebeard took it upon himself to provide money for his hometown and Joyboy, I believe, was a farmer.
The imagery of a straw hat is ever so present in the story; it's not only an object our protagonist can be seen donning on his head, passed down to him from Shanks who got it passed down from Roger – a quite literal inherited will - but also something that we see with the GIANT straw hat locked in a vault at Mary Geoise. And naturally, the theories surrounding what the straw hat stands for are born out of this recurrence. Some theories suggest that this very straw hat is the National Treasure of Marijoas that Doflamingo spoke of and others suggest that the straw hat symbolically represents the sunrise (dawn). To me, the straw hat is simply just that - a hat.
When I look at the straw hat, the first thing that comes to mind is a guy working in the field, in the harsh heat of the sun, using the cheapest possible piece of clothing to protect himself from it. It's an image of a farmer, the working man, the common-folk, or, in the case of Joyboy, perhaps that of a slave working in the fields, cultivating vegetables and fruits for his masters – the citizens of the Ancient Kingdom. There is a saying that all great civilizations were built upon slavery and perhaps the Ancient Kingdom was no different.
The Sun God Nika
History of the World is the history of injustices perpetuated by those in power to those they enslaved. Joyboy and his people, either the Buccaneers or Giants, were one of those people (because of the Giant Hat). The Legend of Sun God Nika probably stems from Joyboy's desire to free the slaves due to his personal experience of being one, mirroring the journey of both Fisher Tiger and Kuma. Tiger and Kuma were also slaves turned pirates, having a desire to use everything in their power to free as many slaves as they could, emulating the legend of Nika.
Joyboy being a farmer might seem a bit random, but the reason for it is actually quite simple – one of the main focuses of the Manga is fruit. Since Chapter 1 - even before with the pilot chapter - the main draw of the Manga were the Devil Fruits. Yes, it's also about Luffy's adventure to become the Pirate King, but Luffy isn't just a pirate; he is a pirate with fantastical powers to stretch which he gained from eating a fruit. It only makes sense, to me, that the man known as the first Pirate would also somehow be connected to the concept of the Devil Fruits.
You see, fruits grow on trees. Presumably, we are eventually going to see the Devil Fruit Tree upon which the first Devil Fruits grew, and to grow trees you need soil to plant them in. You need fertile earth where they can grow, an overabundance of which could've been found centuries ago, before the water levels rose, and before all that land was lost.
That was the "supercontinent" of the World of One Piece (yes, I am aware there were more than just one continent). If the world is eventually flooded, as it seems to be headed towards, then the very resource the Skypieans came from the Moon for will soon be extinct. The only remaining source of this valuable resource will now be the Red Line, which is in its entirety ruled over by Celestial Dragons who stole it from the Lunarians. Celestial Dragons would, quite literally, have complete control over the Earth.
"He who controls the spice controls the universe."
The Original Sin
Nika/Joyboy seems to be closely tied in with pretty much every race in One Piece: Fishmen, Giants, Lunarians, Bucaneers, and all of these races have one thing in common - they were, in one way or another, discriminated against. Lunarians and Bucaneers have basically been exterminated, Fishmen have been driven to the bottom of the sea, and Giants want nothing to do with the World Government or the Navy. This leads me to believe all of these groups have fought on the side of Joyboy during the War, with Joyboy himself being a member of the Buccaneer race.
The great sin, the Original Sin, of the Buccaneer race is that they share blood with the man who "stole" the Devil Fruit he is meant to garden, and used it to opposed the Twenty Kings, which would eventually lead to his banishment and him becoming the first pirate. However, I think there is a twist here because, much like Eve, Joyboy was tricked into consuming the Devil Fruit.
The World Serpent
There is a missing component for the story to make sense, and it's about the War between Twenty Kings and The Ancient Kingdom, and I think that person is Nerona Imu - the Deceiver.
Imu carries the name of a Roman Emperor.
We know that the Twenty Kings united against The Great Kingdom and upon defeating it, they took over ruling the World. However, there are 2 things missing here:
1. The Alabasta Kingdom and Princess Lili refused to join the Twenty Kings, making them only 19, in forming the World Government.
2. Imu also lied about leaving the Throne of the World empty and took it upon themselves to sit upon it.
That's why I believe Imu was someone who not only deceived the Twenty Kings but also someone who deceived Joy Boy into eating the first Devil Fruit. Like how in the Bible, Eve, in desire for knowledge, was tricked by the serpent (Orochi), the embodiment of Envy, to eat the forbidden fruit. The Demon that is often used to represent the Sin of Envy is Leviathan, a giant sea-serpent that is the embodiment of chaos. Leviathan is often compared to various other deities, like Tiamat (Dragon) or, more importantly, Jörmungandr.
Jörmungandr is an unfathomably large sea serpent from Norse Mythology, who dwells in the world sea, encircling the Earth (Midgard) and biting his own tail, an example of an ouroboros. As a result of it surrounding Midgard (the Earth), it is referred to as the World Serpent. The Norse Mythology is the same one the Giants from One Piece heavily borrow from in their aesthetics, and the Giants seem to be familiar with Nika.
"Snake soaked in blood" is how Ouroboros is often depicted as (red snake), and it's also the color of the Red Line. The Red Line is also said to be indestructible.
Furthermore, Jörmungandr releasing its tail is one of the signs of the beginning of Ragnarök (the final battle of the world). I believe that the Red Line is meant to represent the World Serpent, the destruction of which will signal the end of the Great War that has been going on for 900 years.
Interestingly, the only other fruit mentioned in the Garden of Eden was the Fruit of Immortality, which perfectly lines up with the idea of Imu being immortal. In his goal to take over Mary Geoise, Doflamingo, someone aware of Imu's existence, first desired the immortality granted to him by Law's Devil Fruit. He knew that to usurp an immortal ruler, he'd need to be immortal as well.
TL;DR
The Endless Earth that Enel was searching for isn't the Moon but rather the land mass that once existed, 800+ years ago, before the 200-meter flood, and the Red Line that encircles it. It used to be the place where the Ancient Kingdom of Lunaria existed, inhabited by Lunarians, before the 20 Kings united to take away their home. They had advanced technology, the same one we saw on the Moon, which they used to cultivate plants, and eventually create Devil Fruits.

It is "endless" as it goes around the world; like Ouroboros.
The literal translation of the Red Line is "Continent of Red Earth", and at the top of that lies Pangaea Castle, named after the real world supercontinent that once existed, and that will once again exist.
The Ancient Kingdom
According to Whitebeard, there used to exist a "Kingdom of Gods" (神の国, Kami no Kuni?) at the top of the Red Line, inhabited by a tribe of "gods" – the Lunarians. Eventually, the Lunarians would be driven to near extinction and Mary Geoise would be built on their homeland.

These events bear striking similarity to the events that transpired between the Twenty Kingdoms, now known as the World Government, and the Ancient Kingdom. It is said that the Twenty Kings united against the Ancient Kingdom, and after defeating it, they erased any mention of it from history, made sure to exterminate any member of their tribe, and, I believe, they took their home as their own. Everything so far points to the inhabitants of the Great Kingdom being Lunarians.
This might not be common knowledge, due to the anime never adapting Enel's cover story, but the Skypieans, Birkans, and Shandians all originate from the Moon, and have arrived at the Earth because they exhausted the Moon's resources.

If the inhabitants of Skypiea (Sky Island) are called "Skypieans", the inhabitants of Birka (Moon) are called "Birkans", and the inhabitants of Shandia (Blue Sea) are called "Shandians", does that mean the place Lunarians once inhabited is called "Lunaria" (Red Line)? Is the name of the Ancient Kingdom actually Lunaria?

Or, perhaps, Lunaria was only the name of a city in the Kingdom known as "Eden".
The Garden of Eden
Despite Lunarians containing the Latin word for "Moon" in their name, and having similarities to the other moon people, there is actually nothing in the story that suggests they actually originate from it. Instead, their name derives from "lunaria", a plant whose name means "moon-like".

The tattoo on King's face might be a reference to the plant itself.
Recently, One Piece has been drawing increasingly more parallels with the events from the Bible; the Great Flood, Noah's Ark, and the Lunarians/Seraphims being based on the Seraph Angels immediately come to mind, but there are also some older examples, such as the Sunlight Tree Eve and Treasure Tree Adam being named after the first two humans. According to the Bible, Adam and Eve defied God and ate the Forbidden Fruit (of knowledge of good and evil), a crime for which they were banished from the Garden of Eden. I believe the citizens of the Ancient Kingdom, be the Lunarians or some other race, came from outer space, and were primarily known for their cultivation skills.

Besides the aforementioned Adam and Eve trees, we also have the Whale Tree on Zou, the Tree of Knowledge, the Devil Fruits, the Giant Jack, etc, and the imagery of otherworldly beings that would "plant life" across the Universe is surprisingly common in fiction. Marvel Comics have a character by the name of "Gardener", a virtually immortal being who devoted his life to the creation of natural beauty by sowing the seeds of plants, flowers, and trees upon barren or devastated worlds. But, more relevant to Manga, Japan has a famous story that dates way back from the 9th or 10th century, called "The Tale of the Bamboo Cutter", also known as "The Tale of Princess Kaguya", in which the titular Princess Kaguya is found as a baby in a bamboo plant. I'm sure you are familiar with this myth thanks to Naruto.
The Great Kingdom had a garden in which they grew fruit. Eventually, they would create what is now known as Devil Fruits, and the one who was in charge of gardening them was no other than Joyboy.

Farm Boy and the Straw Hat
Chapter 1114 revealed Joyboy to be the very first person to be called a Pirate, confirming decade-old theories in the process, but I think what is more intriguing here is what or who Joyboy was before he sailed under a Jolly Roger. Time and time again, we are met with characters forced into the life of piracy for different reasons, some more noble than others. Kaido was a child soldier betrayed by his country and sold into servitude to the Marines, Whitebeard took it upon himself to provide money for his hometown and Joyboy, I believe, was a farmer.

The imagery of a straw hat is ever so present in the story; it's not only an object our protagonist can be seen donning on his head, passed down to him from Shanks who got it passed down from Roger – a quite literal inherited will - but also something that we see with the GIANT straw hat locked in a vault at Mary Geoise. And naturally, the theories surrounding what the straw hat stands for are born out of this recurrence. Some theories suggest that this very straw hat is the National Treasure of Marijoas that Doflamingo spoke of and others suggest that the straw hat symbolically represents the sunrise (dawn). To me, the straw hat is simply just that - a hat.

When I look at the straw hat, the first thing that comes to mind is a guy working in the field, in the harsh heat of the sun, using the cheapest possible piece of clothing to protect himself from it. It's an image of a farmer, the working man, the common-folk, or, in the case of Joyboy, perhaps that of a slave working in the fields, cultivating vegetables and fruits for his masters – the citizens of the Ancient Kingdom. There is a saying that all great civilizations were built upon slavery and perhaps the Ancient Kingdom was no different.
The Sun God Nika
History of the World is the history of injustices perpetuated by those in power to those they enslaved. Joyboy and his people, either the Buccaneers or Giants, were one of those people (because of the Giant Hat). The Legend of Sun God Nika probably stems from Joyboy's desire to free the slaves due to his personal experience of being one, mirroring the journey of both Fisher Tiger and Kuma. Tiger and Kuma were also slaves turned pirates, having a desire to use everything in their power to free as many slaves as they could, emulating the legend of Nika.

Joyboy being a farmer might seem a bit random, but the reason for it is actually quite simple – one of the main focuses of the Manga is fruit. Since Chapter 1 - even before with the pilot chapter - the main draw of the Manga were the Devil Fruits. Yes, it's also about Luffy's adventure to become the Pirate King, but Luffy isn't just a pirate; he is a pirate with fantastical powers to stretch which he gained from eating a fruit. It only makes sense, to me, that the man known as the first Pirate would also somehow be connected to the concept of the Devil Fruits.
You see, fruits grow on trees. Presumably, we are eventually going to see the Devil Fruit Tree upon which the first Devil Fruits grew, and to grow trees you need soil to plant them in. You need fertile earth where they can grow, an overabundance of which could've been found centuries ago, before the water levels rose, and before all that land was lost.

That was the "supercontinent" of the World of One Piece (yes, I am aware there were more than just one continent). If the world is eventually flooded, as it seems to be headed towards, then the very resource the Skypieans came from the Moon for will soon be extinct. The only remaining source of this valuable resource will now be the Red Line, which is in its entirety ruled over by Celestial Dragons who stole it from the Lunarians. Celestial Dragons would, quite literally, have complete control over the Earth.
"He who controls the spice controls the universe."
The Original Sin

Nika/Joyboy seems to be closely tied in with pretty much every race in One Piece: Fishmen, Giants, Lunarians, Bucaneers, and all of these races have one thing in common - they were, in one way or another, discriminated against. Lunarians and Bucaneers have basically been exterminated, Fishmen have been driven to the bottom of the sea, and Giants want nothing to do with the World Government or the Navy. This leads me to believe all of these groups have fought on the side of Joyboy during the War, with Joyboy himself being a member of the Buccaneer race.

The great sin, the Original Sin, of the Buccaneer race is that they share blood with the man who "stole" the Devil Fruit he is meant to garden, and used it to opposed the Twenty Kings, which would eventually lead to his banishment and him becoming the first pirate. However, I think there is a twist here because, much like Eve, Joyboy was tricked into consuming the Devil Fruit.
The World Serpent
There is a missing component for the story to make sense, and it's about the War between Twenty Kings and The Ancient Kingdom, and I think that person is Nerona Imu - the Deceiver.

Imu carries the name of a Roman Emperor.
We know that the Twenty Kings united against The Great Kingdom and upon defeating it, they took over ruling the World. However, there are 2 things missing here:
1. The Alabasta Kingdom and Princess Lili refused to join the Twenty Kings, making them only 19, in forming the World Government.
2. Imu also lied about leaving the Throne of the World empty and took it upon themselves to sit upon it.
That's why I believe Imu was someone who not only deceived the Twenty Kings but also someone who deceived Joy Boy into eating the first Devil Fruit. Like how in the Bible, Eve, in desire for knowledge, was tricked by the serpent (Orochi), the embodiment of Envy, to eat the forbidden fruit. The Demon that is often used to represent the Sin of Envy is Leviathan, a giant sea-serpent that is the embodiment of chaos. Leviathan is often compared to various other deities, like Tiamat (Dragon) or, more importantly, Jörmungandr.

Jörmungandr is an unfathomably large sea serpent from Norse Mythology, who dwells in the world sea, encircling the Earth (Midgard) and biting his own tail, an example of an ouroboros. As a result of it surrounding Midgard (the Earth), it is referred to as the World Serpent. The Norse Mythology is the same one the Giants from One Piece heavily borrow from in their aesthetics, and the Giants seem to be familiar with Nika.

"Snake soaked in blood" is how Ouroboros is often depicted as (red snake), and it's also the color of the Red Line. The Red Line is also said to be indestructible.
Furthermore, Jörmungandr releasing its tail is one of the signs of the beginning of Ragnarök (the final battle of the world). I believe that the Red Line is meant to represent the World Serpent, the destruction of which will signal the end of the Great War that has been going on for 900 years.

Interestingly, the only other fruit mentioned in the Garden of Eden was the Fruit of Immortality, which perfectly lines up with the idea of Imu being immortal. In his goal to take over Mary Geoise, Doflamingo, someone aware of Imu's existence, first desired the immortality granted to him by Law's Devil Fruit. He knew that to usurp an immortal ruler, he'd need to be immortal as well.
TL;DR
The Endless Earth that Enel was searching for isn't the Moon but rather the land mass that once existed, 800+ years ago, before the 200-meter flood, and the Red Line that encircles it. It used to be the place where the Ancient Kingdom of Lunaria existed, inhabited by Lunarians, before the 20 Kings united to take away their home. They had advanced technology, the same one we saw on the Moon, which they used to cultivate plants, and eventually create Devil Fruits.