I checked on bahn.de and all the connections seem to go either via Wien Meidling or Zagreb. If you have been looking at one of the connections via Wien I can understand why the ticket is expensive.
www.jizdenka.cz gives me a price of 58 EUR for a ticket that goes via Zalaegerszeg, Hodos (Grenze) and Pragersko. This should be the most direct route.
So I went back to www.bahn.de and unchecked "Schnelle Verbindungen bevorzugen" as well as entered "Hodos" in the via field.
I found the following connection:
Budapest-Deli pu ab 12:03 D 246
Ljubljana an 21:31 IC 246 Schnellzug
Verkehrt als D 246 bis Murska Sobota, danach als IC 246
It is the only connection that allows you to go Budapest-Ljubljana without changing.
But:
I did some more digging and after playing around with www.jizdenka.cz I recommend going via Zagreb. The ticket from Budapest to Zagreb is roughly 36 EUR and the ticket from Zagreb to Ljubljana is roughly 17 EUR, together 53 EUR. So if you buy a ticket to Zagreb (and not Ljbubljana) in Budapest and a ticket from Zagreb to Ljbubljana in Zagreb you save 5 EUR.
Those are the two connections with only one change, namely in Zagreb:
Budapest-Keleti pu ab 06:05 IC 200 Intercity Reservierungspflicht
Zagreb Glavni Kolod. an 11:59
Zagreb Glavni Kolod. ab 13:00 EC 210 Eurocity
Ljubljana an 15:18
Budapest-Keleti pu ab 14:05 D 204 Schnellzug
Zagreb Glavni Kolod. an 20:00
Zagreb Glavni Kolod. ab 21:10 D 498 Schnellzug
Ljubljana Mi, 18.03.09 an 23:27