How do I set an actor's static mesh in the editor, but change the material in code?

Yes to all. However, you need to use the following line: YourStaticMeshName->AttachTo(RootComponent);

You can set other properties as well in the constructor (or in the code), like toggle collision on/off, make a custom collision profile, put some offset to the transform from the rootcomponent etc. if you so wish. But when you attach, the mesh rotates and translates with the actor.