OK, so I worked it out. For anyone else that comes along wondering how to do this, I eventually worked out that SetMaterial() actually defines the material for each mesh section. Therefore, if you want a runtime mesh with two materials, then you create the first mesh section and set its material in ElementIndex 0. Then create the second mesh section and set its material in ElementIndex 1.
@: I believe I’ve found some sort of bug to do with shadowing. If you create a runtime mesh in the construction script of an actor blueprint, then it casts shadows fine. However, if you create the runtime mesh in BeginPlay (or anywhere else for that matter), then it no longer casts any shadows. It will receive shows ok, but just not cast them any more. Below is my very basic blueprint showing what I’m doing. I’ve tested this same blueprint with a procedural mesh component instead and shadows work fine in both cases. It is just with the runtime mesh component that it won’t cast shadows if the mesh section is not created in the construction script.