Electric field control of molecular magnetic state by two-dimensional ferroelectric heterostructure engineering