Playing devil's advocate: Let's assume a Borg nanite could assimilate a Q while it/they assumed a corporeal form. Depending on it's collective/queen's objectives, it could wreak plenty of havoc across known time and space. But we're dealing with the Q here, so at any point they could "assume control" switching from chaotic good/neutral/evil as they see fit. After allowing the collective to have it's fun, with a snap, we're back to square one. In the event of actual assimilation, let's just assume the known universe is kaput. Take your pick.
Another option: Assimilating a Q assuming human form is the exact same thing as assimilating any other human. They get no more knowledge of their powers, and maybe only some understanding of the universe as a whole because they only get what's able to actually work inside that meat brain, and not the whole sum of the being of the Q who was assimilated. The nanites only function with the physical aspects, but none of the metaphysical, in this case.
Q would have to allow the Borg to assimilate Q's human form though. I say this because Q should already know everything about the past, present and future. It feels like we might be getting into paradox territory now...
I think an individual as powerful as the Q would end up dominating the minds of the collective. The drones would simply become physical embodiments of the Q's will.
So to answer the question of how fucked? It depends on why the Q wanted to take over the Borg from within.
I'm not sure this would even be possible within the existing canon because the continuum could revoke the powers of the Q who was being assimilated.
Excluding this canonical failsafe, I think it would most likely mean that the Borg would be able to eventually replicate the powers of the Q within the collective. This posses another interesting question or thought experiment.
Would the Borg even be driven to assimilate any more worlds or beings at that point given the fact that their entire motivation is understood to be the pursuit of all knowledge in the universe? The Q seem to be near omnipotent and omnipresent. So, in theory, if the Borg gained access to this power then it seems logical that they would no longer be driven by the same motivations, and would even cease to be Borg at all since they would necessarily reclaim a sense of individualism.
Either way, great question. This is why I love Lemmy. The Trek community here is amazing.
I think the rest of the Q continuum would prevent it entirely. At worst, the assimilated Q just becomes human, lacking all typical Q abilities. However, the assimilated Q would probably still have knowledge well beyond what the Borg have, so even the knowledge gain alone is a huge help to the Borg.
I'm pretty sure they already have and just don't know it. Quinn from Voyager has done "everything" and you can't seriously expect me to believe that being part of the collective isn't on that list.
Of course, you could argue that even if he ever had been assimilated, it wasn't real, since he's still Q and the Borg aren't omnipotent. But then again, that's kind of moving the goal post when you consider how many others managed to maintain some kind of independence after being assimilated. Hugh, Janeway, Seven and her internet friends, they all managed to resist the collective in one way or another.
But ok, for the sake of discussion, what happens if the collective does get the full knowledge and power of a Q? Well, it probably depends on how Q powers and the abilities of other such godlike entities in Star Trek work. Is the continuum more powerful than the ascended collective? Does a comparative power level even enter into it or do they have the admin rights to the universe's operating system? Does it matter how many Qs there are, and if so, does the collective count as just one entity or many, and does that help or hurt their chances? Without a clear understanding of what the rules are, we can't really say how things would likely play out, only how we would want to see them played out.
That said, you could argue that we get the beginnings of a unified godlike powers theory early on in TNG. The Traveler explains that the basic building block of all reality is thought. Essentially, Star Trek's entire universe exists in a mindscape, and thought can directly alter reality. With this as our starting point, we can theorize that Q and any other godlike being is directly manipulating a layer of thought that is the foundation of all reality.
That we can't all do this under normal circumstances, but that we can be given access or suddenly do it by accident when we're beyond the edges of our normal cosmic environment implies that something is actively preventing us from just casually hacking the universe. The Q continuum being able to bestow and revoke such powers, even among their own, implies to me that they are the ones policing this stuff.
Now, how a conflict between an unknowable continuum and an ascendant collective plays out is still vague, but I think we have enough point of reference to translate this conflict into a more familiar form. In this scenario, the universe is a holodeck, the Q are running IT, and the Borg are professor Moriarty. When viewed through this lens, the question is, how effective can the Q be at containing a system breach, vs how well can the Borg evade the Continuum's countermeasures? Since we know the Borg are not always the best at thinking outside the box, while the Q do seem to be able to police their own, my money would be on the Borg getting beaten almost immediately (or perhaps even retroactively).
Well, my money would be on the Q, if it weren't for the Voyager crew being able to beat them with muskets. (I don't care if they aren't really muskets, it's still Qs getting killed or wounded by mere mortals, and on their home turf, which those mere mortals can't even properly comprehend.)