Bravo to Old Airman for latching onto the prospects of Church administered states (his alternate Poland proposal) or religious knightly orders (Terra Mariana). These responses place him at the head of the pack in satisfying the OP and were quite creative.
Running second place was Bruce Munro's idea of a Sicilian republic after an alternate outcome to the Sicilian Vespers. It would not meet the OPs condition of being larger than Portugal (I believe the Sicilian Vespers was an uprising limited to Sicily the island itself and not the mainland Kingdom of Naples), but it would be larger than any city-state northern Italian Republic. What title might the Republic of Sicily give its leaders?
Ashtagon mentioned Iceland in OTL, but nobody answered the question I asked about who was head of state and form of government in post #5.
I disagree with Dunning Kruger's argument:
I think you have an issue with concepts regarding the relationship between god an monarchies. A large republic would be seen as a challenge to the Divine Right of Kings in a way that the revolulutionary ideals of the French Revoution were during the Napoleonic wars. Rulers and kings were ordained by god. City state merchant republics could be tolerated as long as they were seen as subservient to the Holy Roman Empire and the such. But have one acquire land mass such that it could legitimately challenge conventional ideas of the time on the nature of power and I dont think that lasts. Too much of a threat to the kings and queens of the age.
A large republic would have been certainly *unusual* and *strange* in medieval Europe, but I do not think it's foreordained it would be viewed as an automatic challenge to all the monarchies of Europe, or that the rest of the continent would force regime change back to a monarchy.
The large French republic was a threat to the continent and considered so by the Kings and Queens of the age, and, 23 years after its founding in 1792, Europe compelled France to restore a Kingdom. But the French were able to end their Republic, by endorsing Napoleon's Empire all on their own, long before the powers of Europe compelled France to change back to a prerevolutionary regime.
But an earlier example in European history, the non-monarchical Commonwealths and Protectorate of England, Scotland and Ireland, from 1649 to 1660 suggests, is suggestive of the idea that Europe might mostly ignore or be forced to tolerate a large republic. The English restored monarchy on their own, without facing numerous coalitions ideologically committed to changing the regime on the islands back into a monarchy.
So it appears that the trend to see republics as an inherent, contagious threat ironically only *began* with the French Revolution in the late eighteenth century. Over a century and quarter earlier, in the mid seventeenth century, Europe refrained from ganging up on the regicides ruling in the British Isles.