According to The Jewish Study Bible, published by the Jewish Publication Society, Judaism recognizes it as a trope of their own invention, an equivalent to that found in and around around the Levant, such as in Sumer. In a footnote to these genealogies in Genesis, we find the genre addressed as folklore:
Genesis 5.1-32: The ten generations from Adam to Noah...The enormous life spans of Adam and his antediluvian descendants find a parallel in the Sumerian King List, an anceint Mesopotamian text, in which the pre-flood kings rule much longer than those who came afterward (the longest regin was 65,000 years). The underlying conception is that things proceeded on a grander scale in those days. These life spans are thus akin to the biblical alllusions to primordial giants or heroes.
The NABRE, the Catholic Bible produced by the United States Conference of Catholic Bishops, agrees, stating the following in the footnote to the same verses, admitting that Sumer sources also talk about a flood and how in both the cataclysmic event marked a reduction in ages that follow in the legends and folklore:
The genealogy itself and its placement before the flood shows the influence of ancient Mesopotamian literature, which contains lists of cities and kings before and after the flood. Before the flood, the ages of the kings ranged from 18,600 to 36,000 years, but after it were reduced to between 140 and 1,200 years. The biblical numbers are much smaller.
And if all that was just too stuffy and not straightforward enough for you, The Harper Collins Study Bible, produced by the Society of Biblical Literature pulls no punches in telling everyone it's just metaphorical:
The long lives of the patriarchs before the flood (ten genrations) are a sign of the greateness of the ancestors and their distances from the present era. A similar concept is found in Mesopotamian king lists, where the kings before the[ir concept of the] flood (usually seven to ten kings) lived for tens of thousands of years.