If Unearthed Arcana is permissible, then as a Wild Soul Barbarian, it's possible to attain a theoretically infinite number of Temporary Hit Points
... Although in practice there's an upper limit constrained to what creatures the DM is willing to surround a Barbarian with.
On their Wild Surge table, a roll of  results in the following: "Necrotic energy bursts from you. Each creature within 30 feet of you takes 1d10 necrotic damage, and you gain temporary hit points equal to the sum of the necrotic damage dealt to the creatures." [Unearthed Arcana: Barbarian and Monk].
If we assume that all possible targeted creatures are medium size, crammed into a circle around the barbarian (as tightly as possible without creatures occupying the same space), and the barbarian rolls a natural  on the damage roll, they'd deal 10 Necrotic Damage to approximately 112 creatures (a circle of radius 30' has an area of 2,827 sq.ft, and each creature occupies a 5'x5' box, meaning ~113 creatures can be crammed into this circle, including the barbarian), gaining 1120 Temporary Hit Points. Give those creatures Vulnerability to Necrotic Damage, and they'd gain 2240 TempHP. If said creatures are tiny, It would be possible to cram approximately 451 creatures into this space, yielding (with vulnerability) 9020 TempHP. I leave it as an exercise to the reader to consider the scenario where these creatures are also airborne and spread out in the entire sphere surrounding the Barbarian, and not just the circle of space coplanar with the Barbarian on the ground.
I calculated about 144740 possible TempHP, hitting the maximum possible Tiny Creatures that all have Vulnerability―about 7237 creatures
Additionally, while there is a general rule that creatures cannot occupy the same space [Player's Handbook, pg. 191], there are some creatures not bound to this rule (notably Elementals), meaning it is indeed possible to cram an infinite number of creatures into the space surrounding the barbarian, therefore making it possible for said barbarian to hit an infinite number of creatures, and therefore gain infinite TempHP.