For the last boss you can stand right next to it and a lot of the shit can't hit you
The strategy I found online was to screw attack, cancel the screw attack mid-jump, run to the direction you were jumping while charging your attack, turn around and fire, then repeat back and forth. It works very well then the boss' second form is easy. If you don't follow a strategy though you will die, and it sucks because you can't go back and collect more items.
And BTW I technically meant the second-to last boss, the SA-X. The actual final boss isn't that difficult