Suppose a carbanion is involved in resonance and thus its electrons conjugate with unhybridised p orbital of the nearby sp2 hybridised carbon and a pi bond is formed. Since carbanions are sp3 hybridised, how would it form a pi bond or will the hybridisation of the carbon change?
Yes, when bonds are formed, the hybridization can change in a carbon atom.
I think it’s important to remember something. Hybridization is not a real phenomena that occurs in reality. It is a model we use to simplify the complex bonding that occurs between atoms.
So, yes hybridization of the carbon will change, as it is not concrete and can change as bonds are made.