In "Scorpion, Part 2", the Borg reveal that they know Voyager's weapons inventory, but give an evasive answer as to how they got it: Seven of Nine: Voyager's weapons inventory. Photon torpedo complement thirty two. Class six warhead. Explosive yield two hundred isotons. Tuvok: How did you obtain this information? Seven of Nine: We are Borg. Tuvok: Naturally. What is the most likely explanation for how the Borg actually got this information? Did they assimilate it? If so, from whom?
2 Answers
Polaron Beams
Memory Alpha explains that Borg Cubes have Polaron Beams which were :
capable of scanning through Federation shield technology
We witness in VOY 'Scorpion' this scanning occurred (we observe a green light scanning through the bridge). It is likely that the Borg determined their weapons complement using this scan they had run a very short time ago, knowing they would have detected weapons fire from Voyager given its position in Borg Space.
The designations for these weapons provided by Seven aren't made clear as to whether they are the Federation or Borg classifications, so they could have determined the yield by scanning the torpedoes' quantity of explosive material (photopic energy I believe) and categorised it based on their own scales.
Alternatively, such information could have been assimilated during Wolf 359 where several Federation ships were destroyed and many Starfleet officers assimilated. Such torpedoes likely would have at least been in development then and, considering Starfleet was facing the Borg, it is possible such torpedoes may have been fired at the cube in question, meaning relevant information may have been assimilated.
IIRC a borg cube had scanned Voyager fairly recently which means Seven of Nine was most likely using the information gained in that scan.