Remember, Tobi has all the abilities pain had, and Pain only ALMOST got defeated because he underestimated Jiraiya's ability to do genjutsu. (Which he didn't even do, the toads did.) Tobi can also become intangible AND use the other Rinnegan abilities as well
It would probably be a close fight, but Tobi would probably win IMO.
(I think Jiraiya is a MUCH better character though.)