Interesting perhaps the two countries can work together for their programs but the question is the Pakistani leadership powerful enough to start such a joint project despite US pressure... we haven't started the gas pipeline properly nor have we supported the Iranian nuclear program despite going through the same bias Iran is going through in 99 when we were doing our first nuke tests in response to India.
From the Pakistani side there are these problems:
1) Spineless government too afraid of what US will do if we are too close to Iran
2) Where the spaceports or rocket launch sites will be located. Each country will want them in their own territory so that they have more control.
3) Funding. Where will the funding come from. Are the Pakistani/Iranian governments trusting enough towards each other to embark on such a project and fund it? Economic conditions in the two nations are different.
By the way I have never really heard of any nation with a joint space program except Russia and Cuba.
I think that circumstances will force Pakistani leadership towards Iran. America's price simply is to use India as a proxy in our neighbourhood and try to bottle China up. Pakistan will not give up on China.