But I don’t get it why this error occurs.
To see which events are 90 days in the past or older, OwnCloud will have to evaluate all events and see when they are. Recurring events have to be expanded – a recurring event may have the first instance a year ago, but when a single instance is in the future or within 90 days in the past, it has to be returned too. This is called recurrence expansion. Normally, servers do this when they receive an event and store it together with a “first instance” and “last instance” time. Then, when they receive the request “return events only in future and the last 90 days”, they only have to look at the “last instance” and this value should be in the future or max. 90 days in the past.
The owncloud server belongs to me and I didn’t change anything.
DAVdroid 0.9 queried all events and not only the ones in the future and the last 90 days (by default). So, OwnCloud apparently didn’t have to calculate the last instances of your events and thus did not fail.
And why does the error occurs only with shared calendars?
To answer this, knowledge of how OwnCloud internally works is required. I suggest to ask the OwnCloud community.