Yes, by a considerable margin in-universe. Shadow was created aboard the Space Colony ARK by Professor Gerald Robotnik together with Black Doom, and within the story he is roughly 50 years old. Sonic was born naturally and is 15.
The real-world figures are a different matter entirely, since they reflect how long each character has existed as a franchise property rather than any narrative age. Shadow comes in at about 9 years, while Sonic, having debuted considerably earlier, is around 19.
So the answer depends on which sense you mean. In the fiction, Shadow is dramatically older. As characters on a page, Sonic has been around far longer.