The Messenger of Allah ﷺ was asked about the children of the polytheists. He replied, "Allah created them when He created them, knowing fully what they would do."
أخبرنا محمد بن المثنى قال حدثنا عبد الرحمن قال حدثنا شعبة عن أبي بشر عن سعيد بن جبير
سئل رسول الله ﷺ عن أولاد المشركين فقال خلقهم الله حين خلقهم وهو يعلم بما كانوا عاملين
Bukhari recorded it in the Book of Funerals, chapter on what was said about the children of polytheists, hadith no. 1383, from the hadith of Shubah. Muslim recorded it in the Book of Divine Decree, chapter on the meaning of "every child is born upon the fitrah..." etc., hadith no. 2660, from the hadith of Abu Bishr Jafar bin Abu Wahshiya, through the same chain. It is also found in Al-Kubra, hadith no. 2078.