If you beat One Legendary Ship, you're pretty much set to take on the other 4. I think I had a total of ~12 crew when I took on the first legendary ship, and I micromanaged everybody, mostly because I had 3 crew who were under-powered due to a low level (relative to the other crew), especially my captain for some reason.
I would recommend you get together a crew of at least 4 gunners, and at least 10 boarders, excluding the captain, up to level 30 on all of them. The early skill to level up is Intelligence, because it allows you to level up pirates faster later on. Then I would focus on the combat skills, Strength, Agility, and Dexterity, usually in that order, but every pirate is different so make sure you balance it out for everybody. By the time you get to a Legendary Ship, you've gotten so many weapons you could visit a town and sell them for at least 5k, and I recommend selling your low level weapons. You could use that money for Elixirs, extra crew, Weapons, and never forget about food. All of my (attacking) crew had around 20 points in each skill when I took on the last 2 legendary ships, at least, that's a good spot to aim for.