You have picked our 2 favorite times of year to go to WDW. We always go in May/June and September/October.
June ~ Higher humidity, parks stay open later
October ~ Lower humidity, parks close earlier
Our main objective for our May/June trip is to get lots of sunshine and enjoy the hot weather. We are from the Northeast and so this time of year begins our summer. We stay at a resort with a great pool area and easy access to the parks so we can hop back and forth for afternoon breaks from the sun.
We love our September/October trip because the humidity is lower and the temperatures feel perfect. We always go to the Halloween Party at MK. We also love the Food & Wine Festival at Epcot. This is a great time of year to be in WDW.
I'm not sure which month is our favorite because we love both for different reasons. If your main objective is the weather, then I can say that June is hot while October is warm/hot. Temps may be around the same for both months, but the humidity makes a difference.