In the Diccionario de Autoridades (1734) the term nimio is defined as
NIMIO, MIA. adj. Demasiado, excessivo, prolixo. Latín. Nimius, a, um.
Even today the Diccionario de la Lengua Española (DLE) shows the two opposing meanings, plus one more:
1. adj. Dicho generalmente de algo no material: Insignificante, sin importancia.
2. adj. Dicho generalmente de algo no material: Excesivo, exagerado.
3. adj. Prolijo, minucioso, escrupuloso.
A note reads:
Del lat. nimius 'excesivo', 'abundante', sentido que se mantiene en español; pero fue también mal interpretada la palabra, y recibió acepciones de significado contrario.
The note just states that nimio means two opposing things because "the word was wrongly interpreted". What I take away from this is that nimio is probably used in contexts where both meanings would make sense to a hearer, so it got often wrongly assigned the "wrong" one. This sometimes happens when most people are not familiar with a word. Nimio is not an arcane term by any means, but it's not common either; uneducated speakers wouldn't know what to make of it, and would have the temptation to ascribe a suitable meaning. If something can be "abundant, excessive" it can also conceivably be "ridiculously small, insignificant".
There are a few examples of this kind of guessing-by-context that I could mention; for example, many people think sendos means the same as grandes (or fuertes). People have been warned about this common mistake by grammar textbooks for a while now (Andrés Bello does it in his 1847 grammar).
It probably doesn't help at all that nimio has two i's (a sound associated with smallness and diminutives) and is also phonetically similar to words like mínimo and ínfimo. Nimio suggests smallness, not excess.
For another example of opposite meanings, consider lívido, which means "of a color tending to violet or purple" (especially of someone's face), but is nowadays most commonly used to mean "pale" (as in "terrified" or as in "furious"), and whose Latin origin lividus apparently meant "bluish" or "leaden".
Consider also how prolijo (a synonym of nimio in the old DA, written prolixo) also has dissimilar meanings in different times and even today. It means both "long, protracted, excessive, too detailed" and "careful, precise, well-ordered, well cared-for". You can see how one meaning could drift into the other. (The original Latin, prōlixus, appears to have meant "courteous" or "favorable".)