No, the Giant Spider wouldn't be consumed.
But a DM could rule that use of the creature qualifies as one of the spell components.
About components
The spell spider climb (PHB, 277) does have material components that are necessary for casting:
a drop of bitumen and a spider
But because none of those components are consumed, the use of a spellcasting focus or a component pouch(PHB, 203) removes the necessity of actually have those specific components.
A character can use a component pouch or a spellcasting focus (found in “Equipment”) in place of the components specified for a spell. But if a cost is indicated for a component, a character must have that specific component before he or she can cast the spell.
If a spell states that a material component is consumed by the spell, the caster must provide this component for each casting of the spell. A spellcaster must have a hand free to access a spell's material components -- or to hold a spellcasting focus -- but it can be the same hand that he or she uses to perform somatic components.
The components required for spider climb in 5e aren't consumed nor are they required to be eaten in a way that 3.5e required.
Because of that, using the creature as one of the components wouldn't actually destroy it because the spell doesn't require consumption of the component.
Using the components
Let's say that your Wizard lost their pouch/focus. In this case, if they could find a drop of bitumen, they could absolutely use that.
The spider is a bit trickier. You aren't actually 'holding' the Giant Spider, so I'm not sure that qualifies as "hav[ing] that specific component." That bit is going to be up to the DM to rule on how they might achieve "having" the spider component.
Technically, the spell simply requires a spider. Is the creature you're fighting a spider? If so, then it's a viable component. It doesn't matter if it's a wizard or not. It matters whether or not it's a spider. It also doesn't specify live or dead, so there is no reason to require one or the other.
Rule of Cool for using the Giant Spider as an unconsumed component
This DM (me) would look at a situation where a caster lost their focus/component pouch and realized that an enemy would supply a necessary component as clever thinking and reward it by allowing it. I'd still probably require them to be within 5' of the creature as a non-rolled 'touch' to cover the 'having' the component.
That doesn't necessarily help you beat the boss, though. Just allows you to cast a spell when you normally couldn't. I definitely wouldn't allow a caster to 'destroy' a creature by using it to cast a spell. That's too much of a gimme for me.