Stability-Certified Learning of Control Systems with Quadratic Nonlinearities