Yes, this causes engine wear.
When the transmission is in neutral and the engine is “revved” without any load, the spinning engine internals will accelerate, gathering rotational and lateral forces at a faster rate than designed by the manufacturer.
Why will the engine wear? (not an exhaustive list):
Piston compression ring expansion
Rapidly revving an engine will heat up the piston rings much faster. Because they have a much smaller thermal mass than the cylinder liners they expand at different rates. If the compression rings expand too much, they will generate increased friction on the cylinder liners, causing the cylinder liners to wear out (reducing compression).
In the worst case scenario, the compression ring ends touch, pinch the cylinder liner and will most likely cause the piston to crack. Then you’ll have metal fragments flying around destroying the head and cylinder.
On a very cold engine or while lean (not enough fuel), it is easier to get a larger thermal differentiation between the cylinder liner and piston rings.
Some early rev limiters implemented used a fuel only cut which could cause a cylinder to lean out "slowly" and develop a piston hot spot from detonation.
Contrary to other comments & answers given, the cooling system is NOT able to help, as piston failure happens within 4-10 milliseconds after a hotspot develops on a piston or compression ring. (See video for references to fuel injection millisecond times below)
Oil system starvation in wet sumps
More common in continued over revving - the cylinder head & block doesn’t drain the oil at the same rate that oil is pumped out of the sump, leaving the sump empty, common in the Rover V8 engines. This is very common in engines that don't have the minimum oil required. Engines that are not serviced have dirty oil systems and are prone to blockages at high rpm.
This can also be caused if the block uses the same pipes to drain the oil that is also used to ventilate the sump causing oil vaporisation. However the engine would most likely already be overheating for this to occur.
Some poorly designed oil pumps (and water pumps too) can aerate and are unable to pump oil when increased in rpm too rapidly.
The next two points are much more common in performance engines where the manufacturer has tweaked output leaving no room for improvement. You’ll find plenty of videos on YouTube of motorcycles and Italian supercars revving without any load and destroying themselves.
Engines that can handle repeatedly being held on the rev limiter without any failure generally have a conservative rev limit set or have lots of performance parts available.
Connecting rod (conrod) warping
Some conrods will stretch/bend during excessive rpm acceleration. Worst case scenario is it will put greater unbalanced forces on the crankshaft and bearings (higher compression ratio only needs 10 thou). If the engine has tight tolerances it will also bend valves.
The crankshaft or engine block isn’t designed to withstand such a sudden increase in internal force (similar to harmonic imbalances). It only takes a thou or two (0.0254 - 0.0508 millimetres) for the crankshaft to gouge a main bearing.
This is common in performance & motorsport engines so they have increased strength built into the block by adding more ribs and webbing to the cast or billet.
If you’re curious what a “catastrophic” harmonic engine failure looks like at 11,000 rpm with load on a dyno, watch https://www.youtube.com/watch?v=1LkxGx5WJzA and skip to 14:20 where Cosworth gently explore the limit of their turbocharged 4 cylinder during F1 engine research & development.