The two seem almost identical to me. Both fund terrorism (Pakistan funds the Afghan Taliban, Iran funds Hezbollah). Neither of them are on good terms with their neighbouring countries. Both are Islamic Republics. Pakistan even found to be sheltering both Khalid Sheikh Mohammed and Osama Bin Laden so it could be argued Pakistan is worse.
Both of them try to impose Islamic law (Sharia) on other countries. Iran ordered for an author in another country to be killed (Salman Rushdie) for committing the "crime" of blasphemy.
Nearly every year since 1999 Pakistan has brought forward and passed a resolution on "Defamation of Islam" or "Defamation of religion" to the UNHRC on behalf of the OIC (Organisation of the Islamic Conference). Pakistan and Iran were both countries that along with other member countries from the OIC called on the Danish prime minister to prosecute the newspaper that published the cartoons of Muhammad in 2005.

