The trivia (singular trivium) are three lower Artes Liberales, i.e. grammar, logic, and rhetoric. These were the topics of basic education, foundational to the quadrivia of higher education, and hence the material of basic education and an important building block for all undergraduates.
The ancient Romans used the word triviae to describe where one road split or forked into two roads. Triviae was formed from tri (three) and viae (roads) – literally meaning "three roads", and in transferred use "a public place" and hence the meaning "commonplace."
The pertaining adjective is triviālis. The adjective trivial was adopted in Early Modern English, while the noun trivium only appears in learned usage from the 19th century, in reference to the Artes Liberales and the plural trivia in the sense of "trivialities, trifles" only in the 20th century.
The Latin adjective triviālis in Classical Latin besides its literal meaning could have the meaning "appropriate to the street corner, commonplace, vulgar." In late Latin, it could also simply mean "triple." In medieval Latin, it came to refer to the lower division of the Artes Liberales, namely grammar, rhetoric, and logic. (The other four Liberal Arts were the quadrivium, namely arithmetic, geometry, music, and astronomy, which were more challenging.) Hence, trivial in this sense would have meant "of interest only to an undergraduate.