How can I reattach an HVAC duct that came loose below the floor?
The tiny screws have obviously failed so you'll need to re-fasten the flange to the subfloor.
It looks like a 6 inch duct so if you can reach the duct with your hand then do this:
Permanent fix

Bring the duct back up to the hole
Drill a hole through your floor and through the flange around the duct

Make sure these holes will be covered by the register
2 holes at minimum; one at opposing ends of the flange. You want 4? Go for it!
The holes need to be big enough for a toggle bolt. The toggle bolt instructions should advise on a hole size


Insert a toggle bolt through the hole and tighten it until it holds properly

Toggle bolts are usually pretty long so you may wish to shop around for shorter ones or carefully hacksaw the longer ones
If your hole is too big and the head of the bolt falls through the floor then you can remove the v-wing, add a washer, replace the v-wing, and try again. Or drill a new hole of course =)


Put your register back in place and enjoy your heating/cooling


Temporary fix as requested in the comments
Instead of toggle bolts you could:

Buy some all-purpose construction adhesive such as Loctite-Power-Grab-Express
Apply it to the flange
Bring the duct up to the floor hole
Drill regular screws through the floor and into the flange
Put your register back in place and convince (lie to) yourself that you will return at some point to do this properly with toggle bolts =)


Since you have to go to the store to buy the construction adhesive anyways then why not just buy the toggle bolts and drill bit instead? It will take the same amount of time and you'll know it's done properly.