Most readers and writers would probably agree that the history in a historical mystery should be accurate. If your mystery plot depends, say, upon Oliver Cromwell, Jack the Ripper and Gertrude Stein being contemporaries (heaven forbid!) then you're writing alternative history. Unfortunately the question of accuracy is rarely so simple. The historical record, not to mention common sense, would indicate that Queen Victoria didn't hunt Jack down in her spare time, let alone by posing as a member of a traveling circus, but then again maybe the historians missed that. The trick to writing imaginative historical mysteries is keeping just under the radar of the historians.
There is definitely some flying room there. A little research, especially reading the footnotes, quickly reveals that historians sometimes don't know quite as much as it appears. What looks like a detailed drawing often turns out, on examination, to be a few scattered dots of facts connected into a coherent pattern by the historian based on his general expertise and personal theories. Another historian might connect those same dots into an altogether different picture. In Two for Joy we mention the pagan philosophers who fled to foreign shores when Justinian shut down Plato's Academy. The story is often alluded to, but is actually mentioned only briefly in a handful of sources.
But sources also can be untrustworthy. Consider Procopius who, while in Justinian's service, wrote panegyrics to the emperor but in his posthumously discovered Secret History excoriated him as a rapacious demon without a face. As a writer, when faced with such inconsistency, I prefer to choose whatever suits my purpose! That might sound like cheating but, I suspect, historians do much the same thing in a somewhat more sophisticated way. (I don't know if a Byzantine mosaic depicting a demon, like the one above, would give a writer of historicals license to include demons!)
It must also be remembered that surviving records can be spotty. (Not surprising after 1500 years -- I have a hard enough time keeping track of the mailing list for our newsletter for two months). Much of what we know well, we know by chance and what survives is not always what we would expect. During the life of Justinian, Cassiodorus wrote a massive Gothic History. Strangely, those twelve volumes have vanished but a short abridgment, The Getica, by Jordanes, probably made during Cassiodorus' lifetime, survives.
I'm not arguing that historical mystery writers have a license to be inaccurate but rather that they should take advantage of the many available opportunities to be creative. To put the matter into legal terms, the fiction writer's burden of proof is the opposite of the historian's. Historians must prove what they say is true while historical writers are allowed to say just about anything that can't be proved false.