Is it OK to create a negative rail just by dividing voltage with resistors?
Yes, some problems.
First problem is that creating a new midpoint voltage (the would-be 0V ground in your circuit) with 10Mohm resistors has very high impedance, so it would be quite unusable as a ground return. It would have to be buffered with an op-amp to have any reasonable sinking or sourcing ability for any input or output terminal that uses the ground as current return path. Compare that to two separate 9V batteries creating the full 18 volts, there would be a relatively low impedance 0V ground if you used two 9V batteries to generate +9V and -9V supplies.
Another problem is that the power supply output would have to be floating. It may not reference the output 18V to any other equipment, including mains earth/ground.
When it is floating, this is possible, then the divided half-voltage can be the 0V ground for any external circuits. However, if it happens that for some reason the power supply output is not floating, but it for example connects the negative output terminal to mains earth ground, then unfortunately it means your device would use 9V referenced to mains earth as ground and it can't be connected to a say computer that expects 0V to be same potential as mains earth ground.