> According to our current understanding of physics, everything is cause and effect,

We don’t know whether the apparent indeterminism of QM ultimately reduces to determinism or not. It depends on which interpretation of QM you prefer, and none of them has any strong empirical support

> which throws free will out the window,

As well as assuming deterministic QM, you also assume incompatibilism. Reject incompatibilism and you can still have free will even if physical reality turns out to be 100% deterministic

> so what do we even mean by intelligence?

People disagree greatly as to what “intelligence” means, but this is the first time I’ve seen anyone suggest that the issue turns on free will. Usually people present “definition of intelligence” and “does free will exist?” as questions having a significant degree of orthogonality

> Is it just when chains of cause and effect become so complex we can't understand them any more?

Mediaeval philosophers commonly viewed intelligence or intellect as a power, the power to engage in conceptual thought. A “power” is a casual concept - it is the possibility of causing something - but possibility, not necessity. It is orthogonal to the question of free will, so long as our position on free will enables us to meaningfully speak of “things we could have done but never actually did”, “thoughts we could have thought but never actually thought”…

It was our dog’s birthday the other day. She’s a smart dog, but she’s never going to understand the concept of a birthday… she enjoyed some special treats but she’ll never understand why she got them on that occasion. She has intelligence, but not the specifically conceptual sort of intelligence mediaeval philosophers were talking about. And free will doesn’t enter into that

> And if so, why does consciousness even exist at all?

I think intelligence and consciousness are distinct issues. Consciousness is having subjective experiences; intelligence is having thought processes of a certain kind. One entity might have consciousness without intelligence, another might have intelligence without consciousness.

> The only consistent theory of consciousness I'm aware of is panpsychism, which seems very unsatisfying.

I don’t think the competitors to panpsychism are necessarily inconsistent. Of course, if you reject panpsychism, you need a non-trivial criterion to decide what is conscious - and people will ask you to justify that criterion - and maybe all you can say is that it is axiomatic - and I get why proposing axioms can feel unsatisfying, but it isn’t strictly speaking inconsistent, assuming your axioms are consistent with each other. By the Münchausen trilemma, every quest for justification must end in either infinite regress, circularity, or axioms - and if axioms feel unsatisfying, infinite regress and circularity are just as unsatisfying - so maybe we are just doomed to feel unsatisfied.

> I guess the other option is to divorce consciousness from physical master entirely, but then we have kind of opened ourselves up to almost any kind of woo.

I don’t know what you mean by “divorce… entirely”-do dualists (of whatever kind) do that? Do idealists? From my own idealist viewpoint, I reject the claim that idealism necessarily entails “almost any kind of woo”, and I think the thought that it does relies on misunderstanding or misrepresenting idealism, or else confusing certain versions of it which maybe do do that with other versions which don’t