The last Flix bus from Venice to Trieste tonight stops at the airport at 21:25. The 23:00 (23:20 at the airport) bus to Ljubljana and Vienna doesn't stop in Trieste.
The timimg of OP's flight is not suitable for attending a competition in Slovenia the next morning.
If I were in OP's shoes and an earlier flight were out of the question, I would rent a car at the airport. I still think I would find an earlier flight.