An angle grinder can use several "disks" that are very efficient for removing wood. You can buy what is essentially a chainsaw wrapped around a disk. Great for carving and able to throw chips around like mad, but I would NEVER bring it anywhere near a possible hit with a nail.
There are also textured carbide wheels you can put in a grinder. Also able to grind wood rapidly, and perhaps safer if it hits a nail head. Finally, you can buy a disk that is essentially layers of overlapping very coarse sandpaper. This will be less aggressive yet and the paper will wear down with use.
The other problem with using an angle grinder is it won't leave you with a flat surface easily. A grinder is a very local tool. And you want a reasonably flat surface. So if you did choose to use an angle grinder, you might still want to come back to it with a belt or disk sander to get it flat.
Of course, it is also true that other tools may not like nails either. A router for example is a BAD idea here, as that rapidly spinning carbide bit may well meet an untimely end as soon as it hits a nail. And there WILL be nails in a subfloor. If this is a sufficiently old house, they may even be great big, clunky square headed nails.
A problem with anything you use that will remove a lot of wood is the dust it creates. So make sure you use dust protection for the well being of your lungs.
Overall, my choice would be a belt or disk or drum sander designed for floor use. They are fast and efficient, and will give you a flat floor. And they will grind off any nails they hit, although nails may wear down the belts a bit more than just wood.