Well both can be true at the same time...Mourinho is/was better coaching the underdog (Porto, Roma or even Inter). While Pep is better at managing generation-defining super teams.
But while we can only assume what Pep would do with a limited budget, we have seen how Jose has fared coaching high-pressure teams:
mid 2000s Chelsea would be a success, despite not coming close to winning the CL (something his successors (almost) achieved -> 2008, 2012), he put Chelsea on the map, dominating the PL for 2 seasons
Inter would be a total success, dominating the Serie A and winning the CL after 50 years.
I wouldn't consider his stint at Real a success. It was not a total failure, but it was not a success either. Yes he had to compete against one of the best teams ever, but he did not achieve much. The La Liga in 2011/12 was epic, but then he lost the 2012/13 title in spectacular fashion. He failed to make it to the CL final despite being the favourite both years. And in the end, he burned all bridges with the club and left just after 3 years. It does not help that Real starting winning all the CLs directly after he left.
His 2015 Chelsea stint is controversial too. Won the 2015 PL, but did so bad in 2016, that he was sacked. This has never happened to Pep. And once again, the moment he left, the team won another PL, proving that the teams' foundation were more than good.
The last disappointment is the Man.U job, which people hail as underrated or something. He did not win a single big title and actually never even came close to one, despite coaching the biggest club in England with unlimited resources. People forget that Pep and Mourinho got their jobs in the PL around the same time, with both of their clubs kinda in the no man's land. ManU had not won the title the last 4 years, while ManC in the last 3. Both teams needed improvements, but both teams had an unlimited budget. Guess what? Pep since then has won 5 PLs in 7 years, while Jose was fired trophyless after 3 years.