Accurately determining the soluble solid content (SSC), titratable acidity (TA), and firmness of multiple pear varieties is crucial for enhancing their market appeal. Traditional methods using spectral techniques require laborious and trial-and-error preprocessing, feature-wavelength selection, and model-establishment process. Additionally, multiple independent models need to be trained to predict different attributes. In this study, we developed a multi-task convolutional neural network (MCNN) model based on the whale optimization algorithm (WOA) to establish a global model for simultaneously determination of SSC, TA, and firmness of three pear varieties. Spectral data in the range of 300 -900 nm were collected from individual pear samples using a selfdesigned transmission spectra-acquisition device. We established and compared an individual-variety prediction model and a global model using three pear varieties. The optimized MCNN model achieved optimal prediction accuracies for the SSC ( R v 2 = 0.977, residual prediction deviation [RPD] = 5.414), TA ( R v 2 =0.970, RPD = 5.057), and firmness ( R v 2 =0.978, RPD = 6.326). Combing the global-modeling strategy with optimized MCNN architecture enhanced the model 's robustness to variety variation and improved the accuracy in detecting pearquality traits. This model provides a new, convenient, and automated method for end -to-end and simultaneous predictions of multiple quality indicators in fruit without any further processing of raw spectra.