How do I use variables in links.task.yml?
In your module_name.links.task.yml file you can add a route_parameters: array that lists the parameters you want to pass, in your case it would end up:

entity.node.check_backend:
  route_name: module_name.my_route
  base_route: entity.node.canonical
  title: My title
  route_parameters:
    arg1:  'value_for_arg1'


You can find this by looking at the code in \Drupal\Core\Menu\LocalTaskManager which parses this file.