Electrocardiograms (ECGs) are essential for evaluating electrical and structural heart problems, but pediatric ECG (pECG) interpretation remains a challenging area due to the dynamic physiological changes occurring throughout infancy and adolescence. Accurate interpretation of pECG is crucial for the diagnosis and management of various cardiac conditions in children, yet age and sex-related variations in ECG patterns complicate this task. Different from previous studies, which have typically focused on either age or sex predictions, this study aims to develop an artificial intelligence-based system that simultaneously predicts both age and sex from 12-lead pECGs. We employed a multitask deep learning model (DLM) trained on a curated dataset of 54,230 pediatric 12-lead ECG recordings collected at the Buzzi Children's Hospital in Milan, Italy, from 2011 to 2020. The DLM achieved a mean absolute error of 0.532 years for age prediction and an R^2 score of 0.932, indicating high accuracy in age prediction. For sex prediction, the model attained an accuracy of 0.712 on the test set. Overall, these results are consistent with prior studies and highlight the feasibility and novelty of applying multitask DLM to the pECG analysis.