Ian Hunter argues that “secularization” as “transition from divine reverencing to rational autonomy” didn’t happen during the centuries after Reformation. Confessional Christianity didn’t disappear but was more deeply entrenched during that time.
“Secular” referred not to the imposition or incursion of rational atheism but to the formation of purely political institutions and legal structures designed to protect the uneasy peace of a religiously divided Germany.
This did nurture the development of quasi-secular modes of analysis and reasoning, a mentality of secular consciousness, within the “subculture of German public law.” But this “capacity to treat all revealed theological postulates — regarding such things as divine intellection and man’s participation in it, the relation between Christ’s divine and human natures, his mode of presence in the Eucharistic host, and so on — in a neutral and relativistic manner, that is, as the irreconcilable teachings of rival religious communities and ways of life” was practical, piecemeal, and largely confined to the legal subculture.
This accounts for what Hunter describes as the “Janus-faced” quality of German secularity. On one side, “these circumstances had produced a juridical-political framework that was secular in the sense of adopting a neutral and relativistic view of all theological truth-claims in order to maintain a plurality of confessional churches as public law corporations under the supervision of a religiously neutral state.” On the other side, “the role of this framework was not to impose a secular Weltanschauung or civil religion on society, but to permanently maintain an array of publicly supported confessional churches each teaching its own version of absolute religious truth.”
On the contrary: Philosophical viewpoints were treated with the same neutrality as theological viewpoints. Philosophies, like theologies and churches, were mutually hostile, and so had “to be kept at a distance from the institutions of law and politics that had to remain neutral between them.”
Spinozism wasn’t seen as a “secularizing” position, and the opposition to it didn’t come from “conservative” religious forces. Rather, Spinozism “was viewed as a quasi-religious threat to the secular juridical-political regime and the plurality of revealed religions that it maintained.” Spinozism was no more to become the established faith than Catholicism or Calvinism.
How, then, did secularization theories gain such a foothold in modern consciousness?
Reformation battles formed part of the background. Hunter observes that “the most powerful philosophical histories of secularization emerged from Protestant rationalists like Kant and Hegel, for whom Catholicism was the de facto embodiment of a merely historically revealed ritualistic religion destined to be superseded by a philosophical faith.”
Hunter thinks it significant that some of the most important revisionist work of the past few decades has been done on and by Catholics, who point to the persistence of “merely ecclesiastical” faiths (Kant’s term) well into the modern era.
Secularization theories were proposed in order to bypass the restrictions on theological and philosophical establishments. Kant, Hegel, and others claimed that they had discerned the true direction of history and the true foundations of politics; the story of the world was found “in the advance of scientific reason, or the refinement of revealed religion into transcendental moral philosophy, or the sublimation of Christian ideals into a moralized secular state.”
These theories purported to transcend the sectarian squabbles of theologians and philosophers. Hence, “the philosophical historians sought to exempt themselves from the relativistic and pluralistic religious constitution on the sectarian grounds that it was about to be superseded by one of their philosophical religions.”
Thus Kant strongly opposed the 1788 Edict on Religion of Friedrich Wilhelm II. Its effect was to extend the bifurcated, Janus-faced settlement that had been around since Westphalia. Kant insisted that “edict was illegitimate because it supposedly sought to forestall the progressive purification of confessional religion that was leading to a religion of rational self-governance.”
Even though Germans had consented to the edict, Kant argued that their consent was illusory. Since “such a law would block the historical process that was refining their latent capacity for moral and political self-governance and thereby superseding the whole order of confessional religions,” it was morally impossible for the people to consent. To consent to the edict would be to consent to continued darkness and immaturity.
At the time, Kant was seen as an evangelist for the establishment a particular form of philosophical religion. Many later accounts of the battle over the edict essentially take Kant’s side. These theories aren’t about “the secularisation of the religious constitution — there being no empirical object for such theories.” Rather, they are “cultural-political programs aimed at contesting and undermining the religious order by presenting its moral and political deligitimation as an historical process.”
In the last part of his paper, Hunter describes the intellectual and political circumstances that opened the door for philosophical theories of secularization to intervene into German politics. The key point is that secularization theory emerged a “combat concept.” Secularization theory was not a description of early modern religious politics, but a contestant in the political battles of 19th-century Germany.
(Hunter, “Secularization: Birth of a Modern Combat Concept,” Modern Intellectual History 12:  1-32. I am quoting a working paper found here.)