This isnt a easy call, for what we had seen pain is stronger but the fact that any physical attack cant hit madara and his move a the speed of light make me no to underestimate him and madara have been a live for ages giving him more time to raise his skill and more battle exp and for what we know his have the strongest sharingan in the history of naruto so until kishi reveal all of madara ability we wouldn't know for sure and since i am going by the notion that madara is strongest that jiraiya i say there are in the same league but just because of madara lifetime.