From what I know Lego will cancel the Dimensions game soon. Right now it is possible to find on ebay very cheap starter kits. Is it still possible to play the game after Lego is closing down all activities or is a Lego server essential for the game functionalities?
The Lego Dimensions game is actually a console game available on the PlayStation 4, Xbox One, Xbox 360, Wii U, PlayStation 3. So as Shea stated, once you have the game, you can play it whenever you want. All you have to do is insert the disc into your console and load up the game.
About your concern of buying the starter kits, getting the one on eBay could be a choice, as long as you trust the seller. Another way is to get it at Target or Walmart before they don't sell it anymore. Another suggestion for you is to get all the current available sets for Lego Dimensions that are available in store, as once they are no longer being sold at stores, the value will skyrocket. After you have gotten the desired in store sets would you then get it off eBay.