Surprisingly, the answer is theoretically treacherous and depends entirely on how "empty" the universe truly is.
The use of Foucault pendulums
Please ignore the Sun -- the entire Milky Way galaxy in fact! -- and you still have a thin space-dust permeating the regions between a bunch of stars very far away, all the distant galaxies. They serve a very important purpose in the theory of general relativity: they make the spacetime all homogeneously "flat" out at a very long distance from the Earth. That is a hugely important fact! We then get to solve our equations for a spherically symmetric distribution of mass under the assumption that the solution becomes nice and flat out at infinity.
Given this, one way to observe the rotation of the Earth is to simply hang a pendulum that can move in the plane, and mark an arbitrary compass rose on the floor: as long as you are not on the Equator you will see the weight go from swinging North-South to East-West and back again.
These are called Foucault pendulums. They work by the Coriolis force. My easiest explanation of this starts from: the Earth is rotating counterclockwise, so that at any given second if you point East, you are actually traveling at some hundreds of meters per second in the direction you're pointing, depending on your latitude, because you have to travel the whole circumference $2\pi R$ once per day. But actually this means that if you go a little distance $x$ further away from the axis, you need to travel a little faster: $2\pi (R + x)$ per day, so you need to travel $2\pi~x/\text{day}$ faster, to appear to remain "above" where you were. And this is hard to notice at strictly human scales. It means that if you jumped straight up you might land a little west of where you started, but I doubt it's as big of an effect as the width of a hair for that short of a height for that short of a time. Now a very long Foucault pendulum moves approximately in a plane. If you are on the Equator, the plane is parallel to the axis of rotation, and this effect does not exist: a Foucault pendulum on the equator always moves along the same line on the compass rose. But if you are on the pole, then every time that the Foucault pendulum goes out from the center, it lands a little West of where it started, and in fact the effect makes it go from North-South to East-West in a quarter of a day: meaning that from a stationary point out in space, you would see a rotating earth and the Foucault pendulum would seem to be stationary in space. And between these you see a continuum of behavior where the pendulum picks up a little rotation from being oriented partly along the axis of rotation, but it partly stays stationary relative to the Earth from being oriented partly away from it.
How this changes in general relativity
What I have just said is true if we know that the spacetime that the Foucault pendulum occupies is, in a certain sense, flat: which is to say that it exhibits the normal properties that you are accustomed to in your everyday physical life, except for the pesky gravitational force that pulls you down to the ground. But it turns out that masses seem to drag the spacetime a little bit with them: meaning that there is a slight reduction to the Foucault pendulum effect because you are pretending that, near the Foucault pendulum, the meaning of "flat spacetime" is the same as very far away out in space: but actually the flat stationary spacetime is being dragged along by Earth's mass a little bit. This is called the Lense-Thirring effect and it has possibly been confirmed on Earth to within 10% error or so.
So if you're really insistent that there are no distant stars, we do not at present know the true answer to this question. There exists a very strong argument that the Lense-Thirring effects are so small, only because there is so much other stuff out there holding the spacetime so flat at such a distance: that if all of those distant stars weren't there, the Earth would pull the spacetime along with it more and more, and so it would appear to rotate less and less, until it appeared locally stationary because the very meaning of what is "flat space" outside of the Earth would change, would in fact co-rotate with the Earth.
This is known as Mach's principle and it is unfortunately untestable: we do not have a great way to create little "pockets" of spacetime which are wholly detached from this approximate flatness at infinity to see what happens when we rotate an object in them.