Possible ferromagnetism induced in otherwise non-magnetic materials has been motivating intense research in complex oxide heterostructures. Here we show that a confined magnetism is realized at the interface between SrTiO3 and two insulating polar oxides, BiMnO3 and LaAlO3. By using polarization dependent x-ray absorption spectroscopy, we find that in both cases the magnetic order is stabilized by a negative exchange interaction between the electrons transferred to the interface and local magnetic moments. These local magnetic moments are associated to Ti3+ ions at the interface itself for LaAlO3/SrTiO3 and to Mn3+ ions in the overlayer for BiMnO3/SrTiO3. In LaAlO3/SrTiO3 the induced magnetic moments are quenched by annealing in oxygen, suggesting a decisive role of oxygen vacancies in the stabilization of interfacial magnetism.