Data-Driven Discovery of PDEs via the Adjoint Method