BGE: Can I automatically switch to material view on run?
You could split the Start/Stop keys into separate press/release actions... So P engages Material Shading then starts the game; and Escape stops the game then (re)engages Solid Shading.

The devil's in the detail of course, ie. typing exactly the right stuff into User Preferences » Input » 3dView » Object Mode P to start the game engine need only be changed from Press to Release, but the two compound shading actions are best done with two new entries.

Put wm.context_set_enum and space_data.viewport_shade in the first two boxes of both; then, to engage Material Shading with the first new entry, set the Value to MATERIAL and assign key P as Press; and to (re)engage Solid Shading with the second new entry, set the Value to SOLID and assign key Escape as Release.

I tested this out &amp; it works nicely but it's still a good idea to backup your hidden User Preferences file so you can reinstate it if things get messed up). Several blender.stackexchange threads cover this.

Also note that a key's standalone release action will be triggered if a combining modifier (Ctrl / Shift / Alt) is released first.

So modifiers need to 'lag' and be the last key up. Unless the modifier is an adapted normal key, in which case clean key release may require 'cover' from an invoked on-screen dialogue.