Is it safe to re-use the same p and q to generate a new pair of keys in RSA if the old private key was compromised? Say I selected two large primes p and q for RSA and computed my public key (e, n=pq) and my private key (d).

Now, I was careless and compromised my private key (d). p and q were not leaked. Taking into account that (e, n) were already public knowledge, would it be safe to generate a new key pair with the same p and q or are they somehow compromised by the leaking of the private key?

If it would not be safe, how could someone compute p and q from my public-private key pair?
No, it is not safe.

There are several methods to compute $p$ and $q$ from $n$, $e$ and $d$. See appendix C of this document.