It’s not bad in the sense that it’s a hazard to consume but pesto that is heated will certainly change color, texture, and taste which is why it’s not advisable to ever heat pesto.   If you decide to add pesto to pasta, only add the pesto to warm pasta instead of heating it in a hot pan of pasta. The warm pasta will be enough to warm the pesto without changing any of its properties.