This is an interesting question, though it is probably way too broad. Honda claims that there has never been a warranty claim against their VTEC systems - as in, the solenoids and variable valve/timing system is quite reliable.
This isn't at all to say that these engines don't fail - of course they do - however they have a very good track record for reliability if maintained correctly. However gaskets, rings, bearings etc can all still fail as with any other engine.
Any car with 300,000kms on it is going to be due for repairs.
Please note, however. An awful lot of civics get given VTEC badges when they don't have variable timing. You should always look beyond the sticker on the outside of the car. Look under the hood, look at the engine, do some research on the car.