Sundar will find more consistency in his bowling in test matches in a few years to come, being a finger-spinner. Playing alongside Ashwin and Jadeja will allow him to learn skills and get mentorship from perhaps two of the greatest spinners in recent times.
Shadab has the role model of Yasir ahead of him, but his emphasis on batting as opposed to bowling will see him not be a viable long-term solution to Yasir's retirement. He is yet to play a match-winning knock of the quality that Sundar has played in AUS and IND.
In ODI cricket, Shadab has proven himself to be a decent player, and Sundar hasn't had many opportunities to do so. If Shadab is smart, he'll know that his goal should be the ODI format, because there is an all-rounder slot available. Sundar might get a few chances in the subcontinent if he can bat well, but I don't see Jadeja, Chahal, and Kuldeep being dropped for Sundar just now.
In T20s, Sundar is a pretty economical bowler as opposed to Shadab, who gives runs but takes wickets too. Shadab's T20I career is pretty good, but he should be playing the format as a bowler, not an all-rounder.
Both are young, and if they work on some aspects of their games, both can become very good cricketers.