In practice, many mechanical systems have fewer actuators than degrees of freedom, such as transportation robots, aerial vehicles, and flexible structures. These systems are underactuated with high flexibility and low energy consumption. However, unexpected input/output constraints, unmeasurable nonlinear dynamics/disturbances, and complicated gain selections bring about more challenges in real operations. To this end, this paper presents a dual-loop learning control framework for a class of multi-input-multi-output (MIMO) underactuated systems. The <italic>model-independent</italic> inner-loop controller accelerates error convergence and is derived from Lyapunov-based stability analysis. Moreover, the inner-loop controller and the underactuated system are integrated into an optimal reference model by a data-based learning method. The parameters and control gains are <italic>optimized online</italic>. The outer-loop prediction controller directly adapts the optimized reference model as a prediction model. Also, the reference trajectories and disturbance estimates are generated and transmitted to the inner-loop structure. Hence, the real-time performance of the proposed controller is <italic>not</italic> affected by model accuracy. As far as we know, this paper designs the <italic>first</italic> controller for MIMO underactuated systems to <italic>simultaneously</italic> restrict actuated/unactuated motions and actual inputs, predict unknown disturbances, and optimize control gains. The closed-loop stability is theoretically guaranteed. Some hardware experiments provide performance verification. IEEE