How can I remove an electrical box that's screwed into a ceiling joist without attic access?
A picture of your box, instead of generic picture from the internet somewhere, will get you more specific help, but...
Without going into the attic for access from above or cutting open some drywall for access from below you're really stuck with one option: Cutting and/or breaking up the box to get it out of the ceiling.
If you cut, use extreme care:

Turn off power to the box before you start.
Be sure you do not cut into the wire insulation.

Once you've got the box out, see if you can get a 90° drill/driver adapter in there to get the screw removed. If not, you may need to cut the screws off flush or use locking pliers to slowly, very, very slowly get the screws backed out. If you don't they'll most likely end up in the way of the new box.
When you're done, make sure you install an old work fan support box. If you buy a new work box, you'll have to return it or cut from below or gain access from above to install this one.
I have removed boxes this way. I used an oscillating cutter to attack the box, being extremely careful around the wire entry points. When I got close to the wires, I used linesman's pliers to break out chunks of the box.
The worst part was that I'd just installed the boxes and drywalled and painted when we realized we needed 2-gang boxes instead of the 1-gang we'd just installed. :(