The direct magnetoelectric (ME) effect resulting from the polarization changes induced in a ferroelectric film by the application of a magnetic field to a ferromagnetic substrate is described using the nonlinear thermodynamic theory. It is shown that the ME response strongly depends on the initial strain state of the film. The ME polarization coefficient of the heterostructures involving Terfenol-D substrates and compressively strained lead zirconate titanate (PZT) films, which stabilize in the out-of-plane polarization state, is found to be comparable to that of bulk PZT/Terfenol-D laminate composites. At the same time, the ME voltage coefficient reaches a giant value of 50 V/(cm Oe), which greatly exceeds the maximum observed static ME coefficients of bulk composites. This remarkable feature is explained by a favorable combination of considerable strain sensitivity of polarization and a low electric permittivity in compressively strained PZT films. The theory also predicts a further dramatic increase of ME coefficients at the strain-induced transitions between different ferroelectric phases.