I know I could express it this way (x = 0, y = 10): $$ \{ 1, 2, 3, 4, 5 , 6, 7, 8, 9 \} $$ in simple cases.
This is what I could come up with for the more general case: $$ \mathbb I = \{ i_n | i_n > y, i_n < y, i \in \mathbb Z \} $$ How can I express this correctly or formally?
In order to make your suggestion more in line with usual notation, write $$ I = \{ n\in\mathbb Z \mid x<n<y \} $$ There's no need to put a subscript on the variable; it just gets a new value for each element of the set. (The variable is bound by the set builder notation, and is not visible outside it).
In situations where you don't need to be completely formal, it can be simpler and more readable just to write $$ \{x+1,x+2,\ldots,y-1\} $$ -- especially if $x$ is a constant.