Dr. Eggman might also be a part of the story. He's the main antagonist in the Sonic series. His evil plans could be the catalyst for Sonic and Shadow's encounter. Whether it's stealing chaos emeralds or creating some new doomsday device, Eggman's actions could force Sonic and Shadow to interact and either fight against or alongside each other.
In such a fanfiction, they might start as rivals. Sonic, with his speed and carefree attitude, could initially clash with Shadow's more brooding and serious nature. For example, they could compete in a race across a fantastical landscape filled with loops and obstacles. Sonic would be in it for the thrill, while Shadow might see it as a test of his own abilities.
Well, they could have an epic race. Modern Sonic is all about speed and his cool modern moves, while Classic Sonic has his own charm. They might start competing, with each trying to outdo the other in different terrains. It would be a showdown of different Sonic eras.
Classic Sonic could be the most interesting. He represents the roots of Sonic. When he meets Modern Sonic, he might be curious about all the newfangled things like Sonic's modern shoes or his new power - ups. His reactions to the modern elements would add a lot of charm to the story.
You can try fanfiction websites like Archive of Our Own (AO3) or FanFiction.net. They have a wide variety of fanfictions, including those about Sonic meeting Shadow.
Dr. Eggman could be a great main villain. He might have a new plan that involves both the power of Sonic Underground's music and the Chaos Emeralds that Shadow guards. He could try to create a device that amplifies negative emotions through music and uses the Chaos Emeralds' power to spread chaos everywhere.
One idea could be that Sonic Underground's siblings get separated in a new zone and Shadow accidentally stumbles upon them. He initially thinks they are enemies but then realizes they are on the same side against a common foe. Another could be that Shadow is on a mission related to the Chaos Emeralds and crosses paths with Sonic Underground. They end up having to team up to stop a new villain who wants to use the power of music and the Chaos Emeralds for evil.
Another reason is the creativity of the plots. Since it's fan - made, there are no real boundaries. A story could combine elements from different Sonic games or even introduce entirely new concepts. For example, a fanfic could have Shadow and Silver discover a new form of Chaos energy that changes the power balance in their world.
Tails is a very popular character to include. He is Sonic's best friend and his technical skills can add a lot to the story. For example, he could help Sonic and Shadow figure out some complex machinery or technology that is part of the plot.