How can I POST x-www-form-urlencoded data from REST API plugin?
While looking into this, I found this solution to accept form encoded POST data and respond with JSON:

&lt;?php

namespace Drupal\example\Encoder;

use Drupal\serialization\Encoder\JsonEncoder as SerializationJsonEncoder;

/**
 * Decodes form data and returns JSON.
 *
 * Simply respond to form format requests using the JSON encoder.
 */
class FormJsonEncoder extends SerializationJsonEncoder {

  /**
   * The formats that this Encoder supports.
   *
   * @var string
   */
  protected static $format = ['form'];

  /**
   * {@inheritdoc}
   */
  public function decode($data, $format, array $context = array()) {
    parse_str($data, $result);
    return $result;
  }

}


and then add the encoder to the example.services.yml

services:
  serializer.encoder.form:
    class: Drupal\example\Encoder\FormJsonEncoder
    tags:
      - { name: encoder, format: form }


After that, the "Accepted request format" can be selected on the rest plugin config page: 

admin/config/services/rest/resource/example_rest_plugin/edit