I've never come across a "rule" about the differential usage of "it" and "this," and either word is okay in this context. If anything, I think "this" better captures the fact that the writer is referring to the entire dependent clause rather than simply abortion, though I don't think there's a practical risk of confusion. "It" is considered a personal pronoun (third-person singular) even though it's not used to refer to people, while "this" is a demonstrative pronoun, but these classifications won't help answer your question. Both words are used to refer to something mentioned earlier, and in both cases this something can be a specific noun, a phrase, a clause, or something even more general.
Other aspects of the sentence are significantly more problematic. Could you explain the context or why the writer used a hypothetical introductory clause? The rest of the sentence suggests the writer is referring to an actual case rather than something hypothetical or general. I'd suggest something like "The fact that abortion has not been legalized until now [recently?] is not due to an absence of debate [singular unless writer is referring to specific events] on the subject. Rather, despite years of discussion [ditto], it continues [continued?] to be rejected by [the majority of] the population [until recently]." I suggested "continued" under the assumption that the change of law reflected a change of heart in the population. More to the point, if that's not true, the sentence does not make sense. [Edit: I just read S Conroy's comment. Because of the "until now," I didn't even consider the possibility that abortion might still be illegal. If it is, then "until now" definitely needs to go. Perhaps she meant "still," which could be added before "has." (I can see how a non-native English speaker might think that "until now" and "still" are equivalent, but they're not even close in this context.)] Accepting my edits would mean you don't have to choose between "this" and "it," but that's not why I suggested them. If you want to use one sentence instead of two, I would cut the "because of the fact that," which is unnecessarily wordy after "due to." Instead, try "...is not due to an absence of debates on the subject[,] but rather to the fact that the population..."
I'm still trying to figure out why she started with with a hypothetical. Perhaps she is referring to many countries, including some that still haven't legalized abortion and/or others that legalized it long ago? This seems unlikely, but if true, you could try something like "To the extent that abortion has been legalized recently..." or "To the extent that a country has legalized abortion recently..." (Btw, I don't think the passive voice is necessarily bad, but you could also avoid it at the end of the sentence: "...the fact that the population continued to reject abortion.") If the writer is referring to the laws and attitudes of a specific country or region, as I suspect, I can't see any justification for the hypothetical dependent clause.