For anyone also having this problem, I've discovered the cause of the issue I observed, as well as a workaround. The completion prefix can have a stale value even if the text entry field is cleared, and this prefix can prevent any completion matches from being found, causing the size hint to return 0.
To get around this, manually clear the completion prefix before querying for the size hint. If the text entry field isn't being cleared as well at the same time, the prefix can be stored before it is cleared and restored after the size hint is retrieved, keeping the prefix and entered text synchonised.
QObject::connect(&button, &QPushButton::clicked, [&completerModel, secondStringList, &completer]() {
QString cachedPrefix = completer.completionPrefix();
completer.setCompletionPrefix("");
completerModel.setStringList(secondStringList);
completer.popup()->setFixedWidth(completer.popup()->sizeHintForColumn(0));
completer.setCompletionPrefix(cachedPrefix);
});