(Note: The Spear and Shield I'm referring to is the Macedonian weaponry under Phillip II and Alexander the Great - not exactly a spear just to clarify any confusion)
During the medieval period (I know that this stretches a long period of time), pikes were quite common as a form of infantry - and there were many battles where it was pike-on-pike fighting. From what I understand, pike infantry in the medieval period did not incorporate a shield. This, to me, seems quite vulnerable if it was a full on infantry battle with 20 foot long pikes fighting each other with no spear - there is basically nothing to block an incoming spear except by fencing with your own. Furthermore, they would also be extremely vulnerable to missiles.
However, if we go back in time to the Macedonian infantry, small shields were used in conjunction with pikes (although there were no other army that fielded such long pikes at the time) and strapped to their arms. I'd imagine this also gave extra protection against incoming missile fire.
So what's the difference between two? Why did armies in the medieval period not incorporate any shields when it, to me, seems like it would be a lot more beneficial with one than without? Is this related to the increasing employment of crossbows in that time period?
I could recomend this answare from u/Itsalrightwithme. I am not sure if it answares your question directly, but at least it can give you some information on the medieval pikes. It also contains some comments by u/XenophonTheAthenian that gives information about the macedonian heavy infantry and may therefore also be of interest to you.