The biggest cost in creating a real exchange is the communications network. Exchanges run off a dedicated private network of high speed communication lines, connecting brokers to the matching engine. Most exchange connections are in the 40Gigabyte range, because of the huge volume of data.
The next highest cost is the matching engine, The matching engine needs to be able to handle all the orders and quotes coming in from brokers and from market makers. On a modern exchange, that can be 100,000 messages per second.
And the exchange must exceed a five nines up time. 99.999% up time is considered unreliable.
After all that, you must have a regulatory staff to make sure all the rules are adhered to. An then you have to find products to list for trading.