Why is pericardium muscle repolarizated earlier than endocardium?
I'm just going to link you to another post here, which I believe answers the same question. It's because the facilitation of the transient outward current if much more prominent in epicardial regions than in endocardial regions.

And the following citation, "Transient outward potassium current, ‘Ito’, phenotypes in the mammalian left ventricle: underlying molecular, cellular and biophysical mechanisms," provides some mechanistic insight.

To answer the rest of the question:

So in an ECG you have leads that record whether a charge is moving toward, or away from the lead. These net charges are reflected on the ECG as either positive or negative deflections. You have a signal from the sinoatrial node that causes a depolarization in the right atrium, then the left atrium (biphasic p wave). In each case, however, we see the positive p wave because in this depolarization the net charge is moving toward the electrodes. Studies on atrial repolarization note that yes, the atrial repolarization is generally obscured by the QRS complex but occurs with polarity opposite that of the p wave.

With the ventricles, and the T wave you end up with a special case. The endocardial regions and the interventricular septum are the first to depolarize, and you get the QRS complex. These regions have a longer period of contraction than the epicardial regions, however. The outside of the ventricles begin to repolarize quickly (transient outward current, surface becomes more positive), and this repolarization begins at the apex and propagates toward the base of the heart. Where you'd get a negative T wave with the change in charge, the direction that the repolarization travels causes you to get a positive reading.