Throwing a spear is a full round action
This is under Thrown Weapons in the rules:
Daggers, clubs, shortspears, spears, darts, javelins, throwing axes, light hammers, tridents, shuriken, and nets are thrown weapons. [...] Throwing a light or one-handed weapon is a standard action, while throwing a two-handed weapon is a full-round action.
Since drawing the spear from the quiver is not a free action1, you cannot in the same round draw and throw the spear (wether you have a shield in your other hand, or not), as a full-round action only allows you to take free actions and a 5-foot step.
1 Drawing a weapon is a movement action. Only ammunition for bows can be drawn as a free action.
P.S. Aside on wether you can throw the spear with one hand
Weapons are categorized as Light, One-Handed, Two-Handed melee weapons in the rules, that is the handedness applies to their effective use as a melee weapon:
Light, One-Handed, and Two-Handed Melee Weapons
This designation is a measure of how much effort it takes to wield a weapon in combat. It indicates whether a melee weapon, when wielded by a character of the weapon’s size category, is considered a light weapon, a one-handed weapon, or a two-handed weapon.
Two-Handed
Two hands are required to use a two-handed melee weapon effectively.
The rules are not explicit about not needing both hands when using these weapons as thrown weapons, but (a) they only demand two hands to use them as a melee weapon effectively, (b) at least for spears, the mechanics of throwing make no sense for using two hands and (c) the rules above for thrown weapons provide an alternative cost penalty (a full rund action) for throwing two-handed weapons.
So, I believe you should be able to throw the spear with one hand, but it will still take you a full-round action. For your question however, it does not matter if you carry a shield or not: you cannot draw and throw the spear in the same round, either way.