I would like to export a Panels Everywhere site template to code. I know you get some configuration code when you select the export tab, but I'm not sure how you turn that into a module that will generate the template with it's variants and layout on another environment.
You can try features module.
The features module enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together satisfy a certain use-case.
Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module. A feature module is like any other Drupal module except that it declares its components (e.g. views, contexts, CCK fields, etc.) in its .info file so that it can be checked, updated, or reverted programmatically.
the features module converts every entity (views, content types, ...) in to a module and it can easily be installed and modified every where.
Actually there are 2 ways to do that.
You can featurize your panel and realted plugins(mini panels, snippets, custom content etc.) into it using features module. By this method you will get a module which you can place anywhere in your other instance and you will get all the things which you have added to it. More specifically when you create a new feature there are configuration on RHS (page manager, minipanels etc.)
Direct export the panel page and other things which are in your panel page. using the export feature in your panel page itself. Click on export tab and copy the code and go to structure -> pages -> import page and paste the code there. You will have that panel page create in your another instance.
But the best practice I will recommend you should use features module on other side if you have to things quickly use the second approach.