Max, to the best of my knowledge, your information on Urdu in Pakistan is right. Pakistan is possibly the *only nation created in the twentieth century (maybe even history), on purely religious grounds. This country was founded on the basis of religion, not ethnicity/ race or culture and as such, there was nothing to do but use the language of Islam and its followers in the region, Urdu, as the national language, even if it was not spoken by the majority.

As regards, Punjabi; Punjab was partitioned in 1947, into an Indian half and a Pakistani half. Both countries therefore, have regions that are contiguous across the international border, called the Punjab in their respective lands. The Punjab in India is a state that has Punjabi as the official language and this is written in a script called, Gurmukhi. Punjabi in Pakistan is written in Urdu and the script is called, Shahmukhi.