Stokes. Better batsman, better fielder and takes more wockets bowling.
If you look at the stats, it isn't even close.
Let's look at the stats..
Test Batting
AF - 31.78
BS - 33.89
Test Bowling
AF - 32.79
BS - 31.92
That is very close in my opinion. Stokes a very small advantage, but I'd look at other stuff as well, such as economy rate to really break it down more.
ODI batting
AF - 32.02
BS - 39.36
ODI bowling
AF - 24.38
BS - 41.43
Stokes ahead on the batting, but Flintoff a lot better bowling average.
If you take everything into consideration, and could have one for all formats, it's a very difficult choice. I would go with Flintoff on personality, but statistically it's very hard to split them.
Statistically, Woakes isn't far away from them either