In the optical communication systems, the optical spectrum (OS) provides useful informations for optical performance monitoring and optical link diagnosis. In this paper, we investigate the neural-network based OS analysis (OSA) techniques able to simultaneously recognize the OS and estimate the optical signal to noise ratio (OSNR), cascaded filtering distortion (CFD) and carrier wavelength drift (CWD). We demonstrate that, compared with the multi-task artificial neural network (MT-ANN) and convolutional neural network (MT-CNN), the proposed multi-task cascaded ANNs (CANN) and cascaded CNNs (CCNN) can greatly improve the OSA performance and accelerate the training process by exploiting specific features and loss functions for different tasks. The CCNN able to deal with the high-resolution OS (HOS) can further improve the OSA performance compared with the CANN. The averaged OS recognition accuracy and OSNR, CFD and CWD estimation errors obtained with the CCNN (CANN) for the 15 kinds of optical signals are 99.32% (97.07%), 0.36 (0.55) dB, 0.24 (0.32) and 0.04 (0.06) GHz, respectively, even when the various OS distortions are present. The proposed CANN and CCNN with a better versatility, higher OSA accuracy and faster convergence speed are promising enabling techniques for the future intelligent OSA systems.