> Which then begs the question, what is IQ actually measuring - something more like innate intelligence, or a fairly big slice of learned, habituated test-taking ability?

This question was asked and answered many decades ago in sociology. Researchers moved onto more interesting topics and fields. IQ tests measure g factor (https://en.wikipedia.org/wiki/G_factor_(psychometrics)).

> "It is a variable that summarizes positive correlations among different cognitive tasks, reflecting the assertion that an individual's performance on one type of cognitive task tends to be comparable to that person's performance on other kinds of cognitive tasks."

In other words people who are good at these tests are also good at real world tasks. Meaning IQ measures much more than one's ability to pass an IQ test. There are of course many examples of poorly structured IQ tests (including people re-taking the same IQ test and doing better at it the second time around). However a well-structured IQ test presenting novel questions (absent popular culture references and trivia) provides a very good approximation of the g factor in almost all cases. This means high IQ is highly correlated with things like income, unemployment, crime, homelessness, addiction, divorce, and many other objectively measurable life outcomes.

There is room for a philosophical debate about what g factor is, but it is beyond contest at this stage that g factor is real, and IQ almost always does a very good job of measuring it.