Firstly, only purchased kepubs will show a rating. The Kobo Utilities plugin can fetch this, or write it, but, it doesn't get displayed for any other books. It's particularly annoying it was displayed a long time ago.
For the other fields mentioned in the plugboard, you can only set fields that have a destination. You can use templates that pull the data from elsewhere. But, the device does not read these from sideloaded books when they are imported. For some reason Kobo does not read all the core metadata when importing the books. But, the drivers can update the database the device uses when the device is connected. The driver will update the metadata for any books on the device if the metadata does not match what is in the library. This will work for any of the metadata items shown in the interface. It will also use the metadata plugboard when doing this. This does need to be turned on in the driver configuration.
For the plugboards, they must produce valid data for the type. For example, the "pubdate" is a date. I'm not sure what will happen with the template you have used. But, it isn't needed as the publishing date is already a date and the driver will update it correctly. If you wanted to put another date there, you could use the plugboard to do that. The same goes for the publisher.
The column #numpages is not one of the fields that can be set using the plugboard. That is why I use a plugboard for the comments and add the page and word count and some other information.
Looking back at the post listing plugboard entries, I might have misinterpreted that. Or misexplained something. In the metadata plugboard screen, each template and destination field line is separate. If you select the same field for two templates, only one will be saved. If you want to use a more complex template, such as mine posted above, then you can right-click in the template field and select the option to use the template editor. That opens a dialog with a larger field to edit the template. It has several features to help editing a template. And there are also three different template languages. My preference is for "General Program Mode" which starts with "program:" and is more like other languages than the other modes. The example from @Sunlite is in "Template Program Mode".
The subtitle is different to other fields. This is something that Kobo uses and has no equivalent in core metadata. The drivers can set this when updating the metadata. It uses a template. I just have it as:
which could also be just:
Both just put the value of a custom column I have that has the lookup name "#subtitle". Others use templates that do other things such showing the word count or the tags.
I think that covers everything mentioned. If I have missed something, or you want more detail, ask away.