בדף סח ע''ב יש מחלוקת בין רב ושמואל בין רבי יוחנן ורבי שמעון בן לקיש אם תינוק שנשבה חייב חטאות אחת או לא וקשה לי השיטה שמחחיב קורבן כי בין אדם שלעולם לא שמע על תורה ולא על שבת איך יהיה חייב ולפי החזון איש שכתב שכל חילוני היום תינוק שנשבה מגיע לעולם הבה אחרי 120 שנה וידרשו ממנו למה לא שמרתה שבת
Question, izrael jerusalem
The topic of Tinok she'Nishbah is very complex. I will limit myself to addressing your question, which seems to be how a Tinok Shenishbah who never heard of Torah and Shabbos can be Chayev for not keeping Shabbos.
The first thing which must be noted is that Chayev refers to being Chayev a Korban, not Chayev Misah. This means that this is considered a relatively light sin, which can be atoned for without much suffering.
Why is such a person obligated to bring a Korban at all? The answer to that question lies in understanding the concept of Olam Haba. What is Olam Haba? It is being close to Hash-m forever, and basking in His Glory. Even if we will presume that a Tinok Shenishba should not be punished, what did he do to merit Olam Haba? We know that Chazal compare Shabbos to Olam Haba ("Mei'ein Olam Haba"). How can someone who never kept Shabbos be allowed to be close to Hash-m in Olam Haba? He never kept Shabbos! It is a Chesed from Hash-m that such a person is allowed to atone for this by bringing a Korban.
The root of the word Korban is the word "Karov" -- "close." Its purpose is to bring a person closer to Hash-m. This process of atonement makes the person realize how he should start keeping Shabbos and come closer to Hash-m. Once a person realizes that his relationship with Hash-m is the most important thing in his life, he can start becoming a Ben Olam Haba.