Grease casserole dish. Over medium heat, cook onions until tender; stir in soup and cream cheese. Cook and stir constantly until smooth and hot. In casserole, alternate layers of frozen potatoes and hot cream sauce ending with sauce. Cover and bake for 45 minutes or until sauce is bubbly and potatoes are tender. Remove from oven and sprinkle with shredded cheddar cheese.