Judging by the examples in the OED, “variable quantities” was a common expression before “variable” itself came to be used as a noun:
1710 J. Harris Lexicon Technicum II Variable Quantities, in Fluxions, are such as are supposed to be continually increasing or decreasing; and so do by the motion of their said Increase or Decrease Generate Lines, Areas or Solidities.
1743 W. Emerson Doctr. Fluxions 223 If any one of the variable Distances..be called x.
1763 W. Emerson Method of Increments 41 Multiply the given increment by the next preceeding value of the variable quantity.
1801 Encycl. Brit. Suppl. II. 740/1 The abscisses and ordinates of an ellipsis, or other curve line, are variable quantities.
Likewise, “constant quality” shows up in the OED's examples for that adjective:
1753 Chambers's Cycl. Suppl. (at cited word) The semi-diameter of a circle is a constant quantity; for while the absciss and semi-ordinates increase, it remains the same.
1756 N. Saunderson Method of Fluxions 2 The Fluxion of a constant Quantity is nothing.
1803 J. Wood Princ. Mech. (ed. 3) i. 15 When a force..acts incessantly, it is called a constant force.
For these words specifically, I think the change from adjective to noun is facilitated by their suffixes, which derive etymologically from Latin. This type of change is common in Latin (in fact, traditional Latin grammar classifies adjectives as a sub-category of nouns, and Latin adjectives generally inflect the same way as “substantive” nouns), so the usage would probably not have seemed surprising or particularly informal to learned individuals in the past. (Using adjectives as nouns is also fairly common in French, which was the direct source of the words “variable” and “constant”).
There are a number of other words in English that end in -ant/-ent and that can be used as nouns or adjectives, such as mutant, regent, adherent, belligerent, antecedent, innocent; and a smaller number of flexible words like this that end in -able/-ible, such as collectible, comestible, convertible, dirigible, submersible. For some of them, it is fairly easy to imagine a specific elided noun ("submersible craft/vessel/boat") while for others, this is more difficult ("adherent person"? "comestible items"?).
Adjectives ending in -(i)an (another suffix taken from Latin) also are commonly used as nouns, e.g. When did "lesbian" become well-known as a noun, not an adjective?
There are many other tendencies relating to how words can change part-of-speech in English, but I don't know enough and I don't think there is enough space for me to discuss all of them. Here are two general overviews that I found:
In fact, the second of these provides a caveat that I should probably include in this post:
Conversion from noun to adjective and adjective to noun is rather a controversial one.
The controversy is not about the existence of this phenomenon, but about how to explain it syntactically. The most prototypical examples of what is called "conversion" in English are noun-to-verb and verb to noun. With apparent examples of adjective-to-noun, it seems that some authors argue that what's going on is ellipsis (which you describe well as the situation where "longer phrases [...] became abbreviated for efficiency's sake") rather than true conversion.
I found further confirmation of the "controversial" nature of adjective-to-noun conversions in The Directionality of Conversion in English: A Dia-synchronic Study, by Isabel Balteiro, which says:
A total conversion reading is often provided for (those) cases where the adjective may appear with nominal inflections (plural or possessive case) and can also co-occur with the indefinite article and the full range of nominal modifiers, but, as expected, it cannot be modified by an adverb. Examples of this are (an) intellectual (person), (a) facial (operation) and (a) musical (comedy). Further support for their analysis as nouns may be their semantic specialization. However, this occurs as a result of the omission of the noun, that is, as a result of syntactic simplification, the so-called shortening (similar views are found in Stern 1931: 258, 260, 266, 270, 274, 390; Soudek 1968: 66; Brook 1981: 83) and not as a result of conversion. (43)
Balteiro herself seems to maintain that while the process by which adjectives come to be used as nouns (with noun inflections) should not be classified as part-of-speech "conversion," the effective result is the same:
[...]it must be said that neither partial nor total conversion takes place but other processes (mainly ellipsis) whose effects and/or results are, however, similar or identical to those of conversion. (43)