There used to be a Milan-Barcelona night train, with Talgo stock, but it has been discontinued a few years ago.
The problem with Spain is that the majority of the network has non-standard gauge (approximately everything except the AVE high speed trains).