To unlock all of the EX Stages you need to collect all of the Red Star Rings.
Here's a guide made by xTGE:
I know this is pretty lengthy, but it's currently the best guide for getting all of them.
There's stage time markers in the description of the video.
UPDATE:
Now that theres more video content out there, heres a playthrough of the 7 EXtra stages by
Ruki185: