What does optimal mean to you? Smallest size and time to finish an encode does not matter? If so then pick the H.265 MKV 576p25 profile (apparently you have PAL content) set "optimal for source" under dimensions to not stretch or modify the picture in any way. Set the refresh rate to "same as source". CRF 20 should be good enough for most DVDs, you will know when you compare a CRF 17 encode of the same source and cannot make out the difference, if you can try the numbers in between or going even 3 steps further down. 10-Bit won't hurt, but won't benefit much either regarding picture quality, if it would and you're doing lots of filtering, you could even go with 12-Bit (I have it available on Ubuntu, the choice of filters though is limited and won't improve picture quality dramatically I'd say, nor would it justify changing the subsampling if it is availabe). Change the preset from slow to slower if you have no problem waiting for the encode to finish, this is one of the more important settings as it controls all the other setting depending on the profile, level and picture size. Disabling bframes was only imporant for older devices which had trouble decoding H.264 streams with bframes, since you said you care mostly about the result when watching H.265 content on a PC this shouldn't be of any concern.
Simply put, if the resolution is not greater than 1080p60 and playback on current mobile devices is not considered to be important then I choose H.265 with slow or slower on Main10 and 4:2:0 subsampling. That's optimal regarding of what most desktop computers can handle today, some may require video acceleration though to display noisy 1080p 60fps content (e.g. performers dancing in front of big LED displays). That's may experience so far and I never touch the encoder tune setting, I expect the default to be good enough when I'm already throwing this much CPU time at it that the tune may be negligible.