Is this an example of inversion, an idiom, archaic usage, or just incorrect?
There seems to be consensus in the sources that I have looked at that "Come what may" originated as a subjunctive construction. (Many uses of the subjunctive are archaic/obsolete, and so their grammar doesn't necessarily work the same way in modern English as it did when these idioms or constructions first came into use. I think in modern English, it would be considered a frozen idiom, not an example of a modern English subjunctive construction.)
I haven't found so much information about what type of subjunctive it is, or about why the verb is placed first, but here is a brief discussion from "A Historical Outline of the Subjunctive Mood in English, With Special Reference to the Mandative Subjunctive", a thesis by Aristeidis Skevis (2014):
Another interesting case is the front-positioning of the main verb in conditional-concessive constructions. This case could very well be interpreted as optative subjunctive:
(175) Come what may… (‘Whatever may happen…’)
Present subjunctive come is also used in a temporal clause without a subordinator. It is generally initial:
(176) Come Sunday he will have to face the music. (‘When Sunday comes…’)
(177) The supposition is that come tomorrow the inspectors will be allowed to have access to the site. (‘When tomorrow comes…’)
(178) Be that as it may…(‘However that may be…’)
This is the so called formulaic subjunctive (CoGEL p. 157 § 3.60)
The formulaic subjunctive
Like the mandative subjunctive, the FORMULAIC SUBJUNCTIVE consists of the base form of the verb. It is used in certain set expressions chiefly in independent clauses:
♦ Come what may, we will go ahead with our plan.
♦ God save the Queen! ['May God save the Queen']
♦ Suffice it to say that we won. ['Let it suffice . . .']
♦ Heaven forbid that I should let my own parents suffer.
♦ Be it noted that this offer was made in good faith. (formal, rather archaic)
♦ Be that as it may, we have nothing to lose.
The force which the subjunctive conveys here, that of an expression of will, may also be conveyed by let or may. The formulaic subjunctive tends to be formal and rather old-fashioned in style.