The Pb(Ti1-xMx)O3-δ (M=Ni and Pd) ferroelectric thin films prepared by a sol-gel technique have been studied by means of structural characterizations, optical and magnetic measurements. X-ray diffraction and Raman scattering results reflect the visible changes in average structure. Moreover, d8 M2+ doping has important effects on the energy band structure and magnetic orderings. Optical transmittance spectra analysis indicates that Pb(Ti0.85Ni0.15)O3-δ and Pb(Ti0.85Pd0.15)O3-δ thin films present small band-gaps of 2.67eV and 2.55eV, respectively. Also, the as-grown Pb(Ti0.85M0.15)O3-δ thin films show room-temperature ferromagnetism, in contrast to PbTiO3 which is diamagnetic. A bound magnetic polaron model can be employed to explain the observed ferromagnetic behavior.