An investigation has been launched after the four-year-old was found seriously unwell inside his family's car.