How to pass a custom object from a page to another page through a route or other means?
You are passing the object, but you need to pass the object ID. So you will change this:

Url::fromRoute('custom.page')-&gt;setRouteParameters(array('model' =&gt; $model));


To this:

Url::fromRoute('custom.page')-&gt;setRouteParameters(array('model' =&gt; $model-&gt;id()));


Note that your model object will need to have a public id() method that returns the ID for this to work. This will send the ID that is passed in place of {model} to the callback.

If you want the callback function (the controller) to receive a loaded object rather than just the ID, you'll need to do a few things. The first is to add options to your route:

custom.page:
  path: '/custom/{model}'
  defaults:
    _controller: '\Drupal\custom\Controller\CustomController::page'
    model: ''
  requirements:
    _permission: 'administer site configuration'
  options:
    parameters:
      model:
        type: model


Then you'll need to set up a new route in services.yml:

services:
  model:
    class: Drupal\mymodule\ParamConverter\MyModuleParamConverter
    tags:
      - { name: paramconverter }


And you'll need to create the class (Drupal\mymodule\ParamConverter\MyModuleParamConverter) that does the conversion from ID to object. This class needs to implement ParamConverterInterface: 

namespace Drupal\mymodule\ParamConverter;

use Drupal\Core\ParamConverter\ParamConverterInterface;
use Symfony\Component\Routing\Route;

class MyModuleParamConverter implements ParamConverterInterface {
  public function convert($value, $definition, $name, array $defaults) {
    // Create your Model object here (not shown) then return it:
    return $model;
  }

  public function applies($definition, $name, Route $route) {
    return (!empty($definition['type']) &amp;&amp; $definition['type'] == 'model');
  }


}

You can read more about parameter upcasting here: https://www.drupal.org/docs/8/api/routing-system/parameter-upcasting-in-routes