I've never done it but the most direct route would be Chania to Piraeus on the ferry. From Piraeus get onto the main north-south motorway from Athens to Thessaloniki. Note that it isn't motorway class road all the way. About 20 km before Thessaloniki branch off left and follow the motorway to the border with Northern Macedonia at Evzoni. Head towards Skopje and then towards Belgrade in Serbia. From Belgrade head to Budapest in Hungary and from there to Vienna. A bit over 1,700 km.
If you don't fancy stopping overnight in Northern Macedonia or Serbia you'll find a couple of reasonable hotels in Polikastro quite close to the motorway and not far from the Greek border. Set off early from there and you should be able to get into Hungary before stopping overnight again. Polikastro to Szeged just into Hungary is about 800 km.
If you want to avoid the Balkan peninsula altogether then I think you can get a car ferry from Patras to Venice and then drive from Venice to Vienna crossing directly from Italy into Austria. More relaxing and a lot less driving but probably more expensive for the additional ferry. Worth pricing up.