What is the problem here ?!
The output of your Schmitt trigger is connected to ground <-- this is a show-stopper: -

But as you can see, the output gives me something like 0.5 as an
output.
If you fixed the short circuit problem then you need to fix your measurement. At the moment it is measuring the input to the Schmitt trigger and not the output.
When this is fixed consider the next potential problem...
Your input waveform appears to have a period of 5 seconds according to your plot. This means it has a frequency of 0.2 Hz. 1 nF has an impedance of 795 MΩ at 0.2 Hz therefore, the signal amplitude at the input to your Schmitt trigger is far, far too tiny to reach the Schmitt trigger thresholds of 0 volt and 4 volt.
Try using 1 MHz instead and use your voltmeter to ensure the waveform on the input to the Schmitt trigger meets the amplitude criteria I mentioned. Also try Schmitt trigger thresholds that are above 0 volts.