Hopf coactions on commutative algebras generated by a quadratically independent comodule