Is there any way to recover the data from an accidentally deleted shared folder?
I recommend you search for a Free Data Recovery software online.
IME, they don’t work on a NAS, because they are isolated by the File Server from the real file system used by the NAS.
So you would have to remove the HDD from the device, connect it to a Linux PC, and use file recovery software running on the Linux PC (or a Linux LiveCD running on a PC).
Unless anyone knows of recovery software that works via a File Server…