OK to attach a metal electric junction box and armored cable (MC) to underside of subfloor in basement?
Some potential problems could be:


You might not have much wood in the subfloor to screw into, so the box might not hold very much weight (if a ceiling fan or heavy light is possible in the future)
You might puncture the floor above with the box's screws
If someday the subfloor were to be replaced that would be a problem for the junction box
Long screws or nails from new flooring could puncture or be stopped by the junction box. 


Why not just cut &amp; attach a 2x4 support brace between the floor joists, and then attach the box to it? Then you can screw securely to the 2x4, either on it's side or bottom. Like one of these:

 [source - Framing to Add a Ceiling Fan]

Or like this view from above (an attic):

 [source - How to Replace a Light Fixture With a Ceiling Fan]

You could also buy a special metal ceiling fan support bar, like this one at Home Depot   but it's currently $14.28 US, a small piece of 2x4 is likely much cheaper, or even free if it's scrap.