Quantum Black Holes, Elliptic Genera and Spectral Partition Functions